Skip to content

Instantly share code, notes, and snippets.

@burin
Created March 8, 2012 21:07
Show Gist options
  • Save burin/2003460 to your computer and use it in GitHub Desktop.
Save burin/2003460 to your computer and use it in GitHub Desktop.
git pull with rebase (when working in master)
# if working in local master directly instead of in a feature branch:
# you want to bring in updates that have occurred on the remote branch
# without creating a merge commit
# this will rewind your commits, bring in changes from master,
# then put your changes back on top
git pull --rebase
# git pull --rebase origin master
# then a push will look like your changes have occurred on top of the latest
# master branch code
git push
# git push origin master
# more information http://gitready.com/advanced/2009/02/11/pull-with-rebase.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment