Skip to content

Instantly share code, notes, and snippets.

@trongthanh
Created March 16, 2012 06:21
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 trongthanh/2048765 to your computer and use it in GitHub Desktop.
Save trongthanh/2048765 to your computer and use it in GitHub Desktop.
Git commands to pull remote and merge with current branch
# save current changes (if any) to stash
git stash save
# pull remote changes to local
git pull origin
# apply stash and try auto merge
git stash pop
# OR
git stash apply
# if there are conflicts, use mergetool
git mergetool
#then choose 'meld' (install meld before hand)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment