Skip to content

Instantly share code, notes, and snippets.

@celestelayne
Forked from arjunvenkat/branches.md
Created February 28, 2017 05:23
Show Gist options
  • Save celestelayne/752e399af831924a92d770c46cc74a25 to your computer and use it in GitHub Desktop.
Save celestelayne/752e399af831924a92d770c46cc74a25 to your computer and use it in GitHub Desktop.
Creating your own branchs

Creating and working with branches in Git

  1. Create a branch with git branch [your_branch_name]
  2. Checkout the branch with git checkout [your_branch_name]
  3. Publish your branch with git push origin [your_branch_name]
  4. Do some work, commit your changes
  5. When your branch is done, checkout master with git checkout master
  6. Pull down any changes from master with git pull
  7. Checkout your branch again and make sure it is up to date with master using git merge master
  8. If there are any conflicts, fix them. If not, you may need to exit the Vim text editor using :wq
  9. Push your changes up to Github with git push origin [your_branch_name]
  10. Create a pull request by clicking the green pull request button in Github
  11. Describe your pull request and wait for approval from the repo owner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment