git export from github remote repository

前端 未结 10 1285
北恋
北恋 2020-12-07 13:50

I\'d like to export from github remote repository, not cloning it. Similar to svn export, I do not want to get .git folder with it. I can work around it by cloning and remov

10条回答
  •  轮回少年
    2020-12-07 14:45

    For a normal export:

    $ git archive master | tar -x -C /path/to/destination
    

    For a zip archive:

    $ git archive --format zip --output /path/to/destination/file.zip master
    

    Of course for this to work, you'll need to clone it locally first, there's no clean way around that.

提交回复
热议问题