Skip to content

Instantly share code, notes, and snippets.

@arjunvenkat
Last active February 28, 2017 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arjunvenkat/6b9b41e60855606e7da7 to your computer and use it in GitHub Desktop.
Save arjunvenkat/6b9b41e60855606e7da7 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