Git Merging, Conflict Resolution and other common Opeartions: Reference and Examples

Last updated:

WIP Alert This is a work in progress. Current information is correct but more content will probably be added in the future.

Pull without rebase, use theirs-full for all conflicts

$ git pull -s recursive -X theirs origin master

Pull without rebase, use ours-full for all conflicts

$ git pull -s recursive -X ours origin master

solve conflict using "our" (local version, a.k.a. "mine") version of a file

$ git checkout --ours my_file_name.txt

solve conflict using "their" (remote) version of a file

$ git checkout --theirs my_file_name.txt

See also

Dialogue & Discussion