github 怎么clone仓库下的指定目录。我不想把整个目录都clone下来,只是需要修改某个目录,请问怎么做
一个仓库即唯一一个 git,git clone 是对 git 的操作,只能是整个 download 。git无法实现你的需求
// mybranch 指定的仓库名称 git clone -b mybranch --single-branch git://sub.domain.com/repo.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
和其他语言客户端一样处理!Window:Linux:Git:
一个仓库即唯一一个 git,git clone 是对 git 的操作,只能是整个 download 。git无法实现你的需求
可以实现:
和其他语言客户端一样处理!



Window:
Linux:
Git: