Git如何处理符号链接?

烂漫一生 提交于 2020-08-20 03:40:15

问题:

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
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!