How To Create a New Branch and Push it to Github - caihackathon/facer GitHub Wiki
git branch <new_branch_name> <from_branch>
to create a new branch locally
- Alternatively, you can omit the last parameter if you are branching from the currently checked out branch
- Modify and commit changes to new branch as needed.
git push -u origin <new_branch_name>
to push new branch to Github
- Go to GitHub and verify you can see your new branch
- After more committed changes, push changes to GitHub:
git push origin <new_branch_name>
- To be able to use the abbreviated command:
git push
git config --global push.default simple
this is a one time config step for your entire local repo
git checkout <new_branch_name>
to make your new_branch the currently checked out branch
- Now if you run
git push
it will push the currently checked out branch to same branch name on GitHub