Skip to content

Instantly share code, notes, and snippets.

@csanz
Created September 8, 2011 02:35
Show Gist options
  • Save csanz/1202465 to your computer and use it in GitHub Desktop.
Save csanz/1202465 to your computer and use it in GitHub Desktop.
Git Pro Tips

Rebasing

The idea here is that you want to keep your branch super fresh with the latest updates... (some use master, others create a new branch called dev or staging)

  git checkout master && git pull origin master
  git checkout branch-name
  git rebase master
  git push origin :branch-name
  git push origin branch-name

Make sure branch-name is up to date as well. If you have changes you don't want to commit yet, then do a git stash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment