How To Create a New Branch and Push it to Github - caihackathon/facer GitHub Wiki

  1. git branch <new_branch_name> <from_branch> to create a new branch locally
  2. Alternatively, you can omit the last parameter if you are branching from the currently checked out branch
  3. Modify and commit changes to new branch as needed.
  4. git push -u origin <new_branch_name>to push new branch to Github
  5. Go to GitHub and verify you can see your new branch
  6. After more committed changes, push changes to GitHub: git push origin <new_branch_name>
  7. 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
  1. Now if you run git push it will push the currently checked out branch to same branch name on GitHub