当前位置: 动力学知识库 > 问答 > 编程问答 >

How do I exclude a set of files from a local git repository?

问题描述:

This question already has an answer here:

  • Checkout subdirectories in Git?

    6 answers

网友答案:

You should use submodules for this purpose.

Submodules allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a particular commit.


git submodule

Break your big project to sub projects as you did so far.
Now add each sub project to you main project using :

git submodule add <url>

Once the projected is added tot your repo you have to init and update it.

git submodule init
git submodule update
分享给朋友:
您可能感兴趣的文章:
随机阅读: