Download Git repo without all the .git stuff?

Is there a way to download the contents of a git repo from the Unix command line that doesn't pull down everything in the .git directory? I just want the latest version of the repo directories and files, not all the diffs.

Also, is it possible to accomplish this without using a git command (perhaps with wget or curl, for example)?

Thanks.


github has a link to download a .zip archive of the repo, so try using

wget https://github.com/[user]/[repo]/archive/[branch].zip

with [user] , [repo] , and [branch] replaced with the appropriate fields.


As far as I know, the closest thing you can do is to do a git clone --depth=1 (to avoid retrieving more information from the server than you need for the latest version) and then delete the .git directory afterwards. As far as git is concerned, the .git directory is the repo; the checked-out files are just there for your convenience. :)


第二部分:您可以尝试正确替换用户名和回购商标名称

wget http://github.com/[username]/[repo]/archive/master.zip
链接地址: http://www.djcxy.com/p/26278.html

上一篇: 什么是在Mac上安装python模块最兼容的方式?

下一篇: 下载Git回购没有所有.git的东西?