查看完整版本: [-- 如何github网站上下载单个文件夹? --]

Ft2 team -> Git -> 如何github网站上下载单个文件夹? [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

Francis 2016-06-16 20:07

如何github网站上下载单个文件夹?

http://stackoverflow.com/questions/7106012/download-a-single-folder-or-directory-from-a-github-repo



This is a pretty old question, but I figured this out today and Ithought I'd leave this here for anyone else who has the same problem.
As all the previous answers have already noted, you are not allowedto download a single folder using Git. However, you ARE allowed to dothis with subversion. This won't work on a regular git repo obviously,but if you're using GitHub you can actually check out using svn.
For example:svn checkout https://github.com/foobar/Test/trunk/foo
trunk corresponds to master branch. You can use svn lsto see available tags and branches before downloading if you wish. Ifyou want a folder in a branch other than master then replace trunk with branches/branchname.
As of this writing, you can find the subversion URL for any repo onGitHub by clicking on "Subversion" at the bottom of the right sidebar.See GitHub's post on subversion partial checkouts for more info.


查看完整版本: [-- 如何github网站上下载单个文件夹? --] [-- top --]


Powered by phpwind v8.7.1 Code ©2003-2011 phpwind
Time 0.044132 second(s),query:4 Gzip enabled