Do one time:
wget https://github.com/stas00/git-tools/blob/master/how-to-make-pr/github-make-pr-branch
chmod u+x github-make-pr-branch
sudo cp github-make-pr-branch /usr/bin/
(or put it in your local bin
path)
And then any time you want to work on a new huggingface
transformers
feature, just run:
github-make-pr-branch ssh GITHUB-USERNAME huggingface transformers new-feature
It will:
- Fork the project if needed
- Set up this fork to track the upstream
- Sync your fork to upstream master
- Create ‘new-feature’ branch
- Set its upstream for an easy push
Now you just need to:
cd transformers-new-feature
do your magic and when ready:
git commit -a
git push
and the PR is ready (just need to go to github and click on PR suggestion to submit)
It, of course, works for any github project.
If this is useful I can make a PR to add instructions to CONTRIBUTING.pm
.
This could also be converted in an even simpler script invocation specific to transformers
, so it’ll just need:
transformers-pr new-feature
currently it uses an ssh access.
There is also a detailed guide to How to Make a Pull Request (PR).