Skip to content

Instantly share code, notes, and snippets.

@Korveld
Created April 29, 2026 10:00
Show Gist options
  • Select an option

  • Save Korveld/0b677aa7d25b3b8e7550e6d8a3cd18b7 to your computer and use it in GitHub Desktop.

Select an option

Save Korveld/0b677aa7d25b3b8e7550e6d8a3cd18b7 to your computer and use it in GitHub Desktop.
Git resolve conflicts using theirs
git checkout --theirs .
git add .
git commit
git rebase --continue
If for any reason you want to bail out and undo the whole rebase:
git rebase --abort
Quick reminder:
--theirs = the branch being merged in (incoming)
--ours = the branch you're currently on (current)
Warning: During a git rebase, the meanings of "ours" and "theirs" are swapped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment