Current branch, dev, has a HEAD commit Cdev, and I cp(cherry-pick) a commit Cfeature from branch feature:
git cp Cfeature
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: src/afile.txt
I decide to remain src/afile.txt as that in Cdev. I tried
git restore src/afile.txt, but it failed.
CodePudding user response:
You could use git checkout to reset the file to what it was on Cdev:
git checkout Cdev src/afile.txt
And then continue with the cherry-pick:
git cherry-pick --continue
