Skip to content

Instantly share code, notes, and snippets.

@burin
Created March 8, 2012 20:12
Show Gist options
  • Save burin/2003144 to your computer and use it in GitHub Desktop.
Save burin/2003144 to your computer and use it in GitHub Desktop.
git rebase workflow
# create new local feature branch
git checkout -b new_feature
# do work, get money
git commit -m 'sweet'
# push to origin for anti-bus protocol
git push origin new_feature
# do more work, get more money
git commit -m 'sweet'
# pull remote changes in (from fellow money makers?), rebase
git pull --rebase
# push changes back up there
git push origin new_feature
# another day
# some changes happen on master
# switch to local master
git checkout master
# pull and rebase
git pull --rebase
# switch to local feature branch
git checkout new_feature
# get this guy up to date with master, apply commits on top of that
git rebase master
# push it back up to origin, anti-bus protocol
git push origin new_feature
# bringing feature into master
# switch to local master
git checkout master
# move branch and stick it onto master?
git rebase --onto new_feature master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment