There is a new tool that helps you make PRs much easier to create. It will magically handle forking, syncing the forked master, and then making a branch. It will clone the repo or use an existing checkout.
Please give it a try and send me feedback if you encounter any problems or want more magic that I haven’t thought of yet:
curl -O https://raw.githubusercontent.com/fastai/fastai/master/tools/fastai-make-pr-branch
chmod a+x fastai-make-pr-branch
./fastai-make-pr-branch https your-github-username fastai new-feature
Most of you, developers, will probably want
ssh instead of
./fastai-make-pr-branch ssh your-github-username fastai new-feature
It’s in the
tools/ dir, so you can just
git pull and run it directly via
run it w/o arguments for help:
This program will checkout a forked version of the original repository, sync it with the original, create a new branch and set it up for a PR.
fastai-make-pr-branch auth user_name repo_name new_branch_name
auth: ssh or https (use ssh if your github account is setup to use ssh)
user: your github username
repo: repository name to fork/use
branch: name of the branch to create
fastai-make-pr-branch ssh myusername fastai new-feature-branch
- if the original repository has been already forked, it'll be done by the program (it will ask you for your github password)
- if the program is run from a directory that already contains a checked out git repository that matches the parameters, it will re-use it instead of making a new checkout.
- if the requested branch already exists it'll reuse it
- if the master is out of sync with the original master it'll sync it first