Skip to content

Instantly share code, notes, and snippets.

@fizerkhan
Last active August 29, 2015 13:59
Show Gist options
  • Save fizerkhan/10592136 to your computer and use it in GitHub Desktop.
Save fizerkhan/10592136 to your computer and use it in GitHub Desktop.
Git merge Vs Git Rebase

Git merge vs rebase

  • git pull --rebase instead of git pull

  • git rebase -i @{u} before git push

  • (on “feature”) git merge master to make feature compatible with latest master

  • (on “master”) git merge --no-ff feature to ship a feature

  • However if “feature” contains only 1 commit, avoid the merge commit: (on “master”) git cherry-pick feature

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