Merge Conflict

Chester Wyke November 02, 2023 Updated: April 15, 2025 #git

Accept their/ours

Source: https://stackoverflow.com/questions/914939/simple-tool-to-accept-theirs-or-accept-mine-on-a-whole-file-using-git

For conflicts it’s generally best to look at each and make a decision. If you are a priori sure which one you want, here are the commands to do it without opening the file to see.

Warning!: If you are rebasing --ours and --theirs are swapped.

Take ours

git checkout HEAD -- <filename>

Take theirs

git checkout --theirs -- <filename>