Skip to content

Instantly share code, notes, and snippets.

@reterVision
Created January 7, 2013 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reterVision/4475316 to your computer and use it in GitHub Desktop.
Save reterVision/4475316 to your computer and use it in GitHub Desktop.
# How to merge other branch to master.
# First fetch the changes from your branch, could be made by others
git fetch
# Then commit your changes.
git commit -m "some"
git push origin my-branch
# Switch to master branch and pull the latest code to your local.
git checkout master
git pull
# Merge the changes made by you from your branch and push the latest code
# to remote.
git merge --squash my-branch
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment