What are merge strategies and options such as `ort`, `ours` and `-X theirs`?
IntermediateConceptMerge, rebase and cherry-pick
Answer
ort is the default strategy (since 2.34, replacing recursive) and handles renames well and quickly. -X ours and -X theirs are options that resolve only conflicting hunks in favour of one side. The ours strategy (-s ours) is totally different: it records a merge commit but keeps your tree unchanged, discarding the other branch's content.
git merge -X theirs feature
git merge -s ours obsolete-branch
More on Merge, rebase and cherry-pick
What is the difference between a fast-forward merge and a merge commit?BeginnerHow does a three-way merge work?IntermediateWhat does `git rebase` actually do?IntermediateMerge versus rebase: how do you decide?IntermediateWhat are squash merge, merge commit and rebase-and-merge on GitHub?IntermediateWhy does a squash-merged branch show as unmerged to `git branch --merged`?Intermediate