I want to update my template from the source, so I use these commands:
git remote add template https://github.com/ObsidianPublisher/template-netlify-vercel
git pull template main --allow-unrelated-histories
Then I list all the conflict files:
git diff --name-only --diff-filter=U
A
B
C
So far so good. I want to keep A. The rest should be overwritten. I use:
git checkout --ours -- A
git checkout --theirs -- .
But checking it again it doesn't work:
git diff --name-only --diff-filter=U
A
B
C
Why is that?
git checkout --oursandgit checkout --theirsonly change the file in the working tree, but do not resolve the conflict. You still have togit addthe so checked out file to mark the conflict resolved.