简体   繁体   English

您如何在 GIT 存储库中保留符号链接?

[英]How do you preserve symlinks in a GIT repo?

I have symlinks to several folders in my project, in a GIT repo.我在 GIT 存储库中的项目中有几个文件夹的符号链接。 When I clone the repo elsewhere on another server, the symlinks aren't preserved and become files.当我在另一台服务器上的其他地方克隆存储库时,符号链接不会被保留并成为文件。

On that server, I tried setting the global setting for "core.symlinks=true" before cloning, but that didn't help.在该服务器上,我尝试在克隆之前为“core.symlinks=true”设置全局设置,但这没有帮助。

How do I preserve the symlinks in the repo?如何保留 repo 中的符号链接?

答案有点晚,但这适用于Windows

git clone -c core.symlinks=true <URL>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM