以下命令必须在git bash中运行,不能在powershell或者CMD中运行

$ mkdir pcl-examples
$ cd pcl-examples								#make a directory we want to copy folders to
$ git init                            			#initialize the empty local repo
$ git remote add origin -f https://github.com/PointCloudLibrary/pcl.git     #add the remote origin
$ git config core.sparsecheckout true			#very crucial. this is where we tell git we are checking out specifics
$ echo "examples/*" >> .git/info/sparse-checkout #recursively checkout examples folder
$ git pull --depth=2 origin master			#go only 2 depths down the examples directory
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐