Getting git to follow symlinks (again)

后端 未结 5 1595
温柔的废话
温柔的废话 2020-12-28 16:15

Somebody already asked how you can get git to follow symlinks. There was an answer for a symlinked directory, but not for a symlinked file. It was also ove

5条回答
  •  误落风尘
    2020-12-28 16:50

    I'm pretty sure there's no way.

    Additionally, it sounds like a kind of insecure, undefined behavior - what should it do when you move between versions of the file and it needs to write to it? In particular, if you check out a revision before it was added, do you really want it to remove the contents of a file outside the repository? What happens if you come back to present and recreate the file, or if the symlink itself is modified - should git also track the symlink itself?

    Things along these lines were said on the git mailing list late last year in response to essentially the same question.

提交回复
热议问题