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 contain unmerged entries because of a previous failed merge. By default, if you try to check out such an entry from the index, the checkout operation will fail and nothing will be checked out. Using
-f
will ignore these unmerged entries. The contents from a specific side of the merge can be checked out of the index by using--ours
or--theirs
. With-m
, changes made to the working tree file can be discarded to re-create the original conflicted merge result.