In Visual Studio, I can easily take the current (or incoming) branch's changes while resolving merge conflicts. This is like merging with --ours (or --theirs) merge strategy for a single file. Could someone please tell me how I would do this on the command line :)
I have tried git checkout --ours -- $filename
. That exits with code 0, but when I run git status
, the file still shows as "both added". I am baffled at why this does not work.