【发布时间】:2017-02-01 22:44:31
【问题描述】:
我正在尝试提取我的 git 存储库中特定文件夹中的所有文件和文件夹。我已经尝试过使用 sparce-checkout 但这会拉出特定的文件夹。我希望它只提取文件夹内的文件。
我有一个名为 /EWINS/ 的文件夹,我希望提取该目录中的每个文件夹和文件。
我试过了:
git 初始化
git config core.sparseCheckout true
git remote add -f origin https://MYDIRECTORY
echo "EWINS/*" >> .git/info/sparse-checkout
git pull origin master
但是,这会导致文件夹 EWINS 被拉出,因为我需要 EWINS 中的所有项目。
我参考过: How do I clone a subdirectory only of a Git repository?
http://lakehanne.github.io/git-sparse-checkout
任何帮助将不胜感激。
【问题讨论】:
标签: git github directory bitbucket pull