github中,如果只需要下载某个文件夹,下载整个项目没有什么必要。
比如只需要下载文件夹 2.3word-count-map-reduce/WordCount

这里用svn
下载
安装svn
sudo apt-get install subversion
获取svn下载地址
进入要下载的文件夹

将其中的/tree/master
替换为/trunk
(类比其他文件也有这个部分)
复制其网址为:
https: //github.com/wyx000/big-data/tree/master/code/chapter2/2.3word-count-map-reduce
得到svn地址为: https: //github.com/vbay/big-data/trunk/code/chapter2/2.3word-count-map-reduce
svn下载
进入要下载到的本地文件夹地址,这里我存储在~/MyProject/dw-git
输入下列命令行
svn co svn地址
或svn checkout svn地址
svn co https://github.com/vbay/big-data/trunk/code/chapter2/2.3word-count-map-reduce
或
svn checkout https://github.com/vbay/big-data/trunk/code/chapter2/2.3word-count-map-reduce

可以看到文件夹里目标文件夹2.3word-count-map-reduce/WordCount
已经下载到本地

网友评论