In a Git repository I would like to replace an existing file with a soft link to a file outside the repository. (Just to make things clear, I want to reference a file automatically generated by an external tool.)
$ git rm FILE
$ ln -s PATH-TO-FILE FILE
$ git add .
$ git commit -m "..."
Everything is cool. I git-format-patch out of this commit - no problem there. But when I attempt to apply this patch ...
$ git am < PATCH
Applying: PATCH
fatal: unrecognized input
Patch failed at 0001 PATCH
...
git-apply produces similar, but less verbose, result.
Is there a way out of this situation ?
Is this behaviour normal at all, or is it a bug ?
Thanks in advance !
As was pointed out by @janos, this problem does not exist in newer git version.
Indeed, building (the recent) git from source solves the problem, so apparently there was a bug in format-patch.
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