有project ,newstart.
它裡面的檔案如下
test1
test2
LICENSE
README.md
git clone https://github.com/someone/ne... /tmp/newstart
會拉取全部的四個檔案。
test1
test2
LICENSE
README.md
現在我想只是獲得test1這個資料夾和它裡面的全部東西,請問,有無辦法做到?
PHPz2017-05-02 09:47:54
需要git1.7以上
$ mkdir test
$ cd test
$ git init
$ git remote add -f origin https://github.com/Rozbo/puck.git
$ git config core.sparsecheckout true #开启Sparse Checkout模式
$ echo "app" >> .git/info/sparse-checkout #设置仅拉取app这个文件夹
$ git pull origin master