-
Notifications
You must be signed in to change notification settings - Fork 5
PR from a Unique Branch
By default, all of your work is on the master
branch. You'll want to make your changes on another branch rather than master
(e.g. fix-mispell-apple-32
). This is important because by leaving your master branch untouched, it is easy to create a another branch (e.g. `fix-mispell-year-33). Using this technique, you can have multiple PRs open at the same time against the same repo.
git status
git branch fix-mispell-apple-32
git checkout fix-mispell-apple-32
git status
This line outputs something similar to
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Notice, it tells you we are currently on the branch master
This line creates a new branch called fix-mispell-apple-32
(even though we created the new branch, we are still on master
, you can check with git status
).
If you'd like to see all of your branches that currently exist, you can use git branch
This line switches to branch fix-mispell-apple-32
. If you run git status
after this, you'll see
On branch fix-mispell-apple-32
Push your new branch up to GitHub
git push origin