问题:
If I have a file or directory that is a symbolic link and I commit it to a Git repository, what happens to it? 如果我有一个符号链接的文件或目录,并将其提交到Git存储库,它会发生什么?
I would assume that it leaves it as a symbolic link until the file is deleted and then if you pull the file back from an old version it just creates a normal file. 我会假设它将它作为符号链接留下,直到文件被删除,然后如果你从旧版本拉回文件它只是创建一个普通文件。
What does it do when I delete the file it references? 当我删除它引用的文件时它会怎么做? Does it just commit the dangling link? 它只是提交悬空链接吗?
解决方案:
参考一: https://stackoom.com/question/40K8/Git如何处理符号链接
参考二: https://oldbug.net/q/40K8/How-does-Git-handle-symbolic-links