将符号链接添加到 git 存储库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7328449/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 05:57:34  来源:igfitidea点击:

Add symlinks to git repository

git

提问by James P. Wright

I'm working on a little library and it depends on another github project.

我正在开发一个小库,它依赖于另一个 github 项目。

I know that some projectsadd symlinks. How exactly do you do that?

我知道 有些项目会添加符号链接。你是怎么做到的?

回答by Jorge Israel Pe?a

What you'll want to use are git submodules.

您将要使用的是git submodules

Example: git submodule add git://github.com/user/project.git destination-dir/

例子: git submodule add git://github.com/user/project.git destination-dir/