如何用git拉特定目录 [英] How to pull specific directory with git
本文介绍了如何用git拉特定目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
进行一些更改,提交并重新推回。
有可能吗?
解决方案
- cd进入您的回购复制
- git fetch
-
git checkout HEAD路径/ to / your / dir /或/ file
- (3)中的path / ...开头位于包含... / file的repo根目录下的目录
I have a project with git, and I just want to clone or pull a specific directory, like myproject/javascript just like subversion does.
make some changes, commit and push back again.
It's possible?
解决方案
- cd into the top of your repo copy
- git fetch
git checkout HEAD path/to/your/dir/or/file
- Where "path/..." in (3) starts at the directory just below the repo root containing your ".../file"
这篇关于如何用git拉特定目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文