首页 > github clone有某个仓库下的指定目录

github clone有某个仓库下的指定目录

github 怎么clone仓库下的指定目录。我不想把整个目录都clone下来,只是需要修改某个目录,请问怎么做


一个仓库即唯一一个 git,git clone 是对 git 的操作,只能是整个 download 。git无法实现你的需求


// mybranch 指定的仓库名称
git clone -b mybranch --single-branch git://sub.domain.com/repo.git

和其他语言客户端一样处理!
Window:

Linux:

Git:


可以实现:

mkdir myrepo
cd myrepo
git init
git config core.sparseCheckout true
git remote add -f origin git://...
echo path/to/subdir/*> .git/info/sparse-checkout
git checkout branchname
【热门文章】
【热门文章】