i am trying to apply a commit from one repository and apply it on other repository. to do so, i am using git show to generate the git patch\diff then pipe it to git apply. for some commits, the following error pops
$ git show <hash> | git -C ../other/repo apply
error: .foo.txt: already exists in working directory
git apply to fail?git apply generally doesn't try to resolve conflicts. You appear to have a .foo.txt file that already exists, and the patch expects to create one, not modify an existing gone.
You can try the following:
.foo.txt and your preexisting one. (This may require an additional commit if you make any changes.)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With