Enable branch to be specified in `Repository.push_to_hub`
See original GitHub issueAs a user, I would like to be able to push my repo’s files to a specific branch on the Hub, e.g.
my_repo = Repository(...)
# create some local files, e.g. save a model
my_repo.push_to_hub(commit_message="I love Git!", branch="my-awesome-branch")
This would be quite useful for the evaluation / benchmarking projects where the current idea (due to @lhoestq) is to store the model predictions for task X in a separate branch on a single repo. (We store the predictions for reproducibility purposes)
I’m not sure if Repository.push_to_hub
is the right entry point for this feature or whether it makes sense to have something like Repository.git_checkout
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Changing the default branch - GitHub Docs
If you have more than one branch in your repository, you can configure any branch as ... You can set the name of...
Read more >Set Git branch security and permissions - Azure Repos
Use the branches view to configure security. Open the Branches page by navigating to your project in the web portal and selecting Repos, ......
Read more >Getting Started with Repositories - Hugging Face
This document shows how to handle repositories through the web interface as well as through the terminal. There are no requirements if working...
Read more >docker push - Docker Documentation
Use docker image push to share your images to the Docker Hub registry or to a self-hosted one. Refer to the docker image...
Read more >Configure git to use 'main' as the primary branch
Overview When you initialize a new git repository via SSH on a DreamHost server, the primary branch is named master. This is because...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m taking care of it in the branch-push-to-hub branch!
You mean something like the following:
This would essentially be a clone + checkout, or did you envision it a different way?