Skip to content

Instantly share code, notes, and snippets.

@tanyuan
Created April 5, 2016 00:47
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 tanyuan/bc46178794748194f5d94a8853a7ed9a to your computer and use it in GitHub Desktop.
Save tanyuan/bc46178794748194f5d94a8853a7ed9a to your computer and use it in GitHub Desktop.
How to merge the right and easy way.

Git: Merge remote branch

  1. git fetch origin BRANCH
  2. git merge origin BRANCH
  3. Resolve conflict:
    • Manually. grep -lr '<<<<<<<' .
    • Choose one side.git checkout --ours PATH/FILE or git checkout --theirs PATH/FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment