How do you quickly take one side's version for a conflicted file?
IntermediateConceptConflicts, remotes, fetch, pull and push
Answer
During a merge, --ours is your current branch and --theirs the branch being merged. During a rebase the meanings flip, because your commits are being replayed onto the upstream: --ours is the upstream and --theirs is your commit.
git checkout --theirs path/file && git add path/file
git restore --theirs path/file
More on Conflicts, remotes, fetch, pull and push
What do conflict markers look like and how do you resolve them?BeginnerWhat is `merge.conflictStyle=zdiff3` and why use it?IntermediateWhat are stages 1, 2 and 3 in the index during a conflict?AdvancedHow do you see what a merge conflict is about before resolving?IntermediateWhat is the difference between `git fetch` and `git pull`?BeginnerWhat is a remote and what does `origin` mean?Beginner