Choose Git merge strategy for specific files (“ours”, “mine”, “theirs”)

For each conflicted file you get, you can specify git checkout –ours — <paths> # or git checkout –theirs — <paths> From the git checkout docs git checkout [-f|–ours|–theirs|-m|–conflict=<style>] [<tree-ish>] [–] <paths>… –ours –theirs When checking out paths from the index, check out stage #2 (ours) or #3 (theirs) for unmerged paths. The index may … Read more

Git conflict markers [duplicate]

The line (or lines) between the lines beginning <<<<<<< and ====== here: <<<<<<< HEAD:file.txt Hello world ======= … is what you already had locally – you can tell because HEAD points to your current branch or commit. The line (or lines) between the lines beginning ======= and >>>>>>>: ======= Goodbye >>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt … is what … Read more