我想从Github远程仓库导出,而不是将其克隆。类似于svn export,我不想带有.git文件夹。我可以通过克隆并删除.git文件夹来解决这个问题。我想知道是否有更简便的方法?
我在某处读到可以使用git archive来实现这一点。
但是我遇到了以下错误...
$ git archive --format=tar --remote=git@github.com:xxx/yyy.git master | tar -xf -
Invalid command: 'git-upload-archive 'xxx/yyy.git''
You appear to be using ssh to clone a git:// URL.
Make sure your core.gitProxy config option and the
GIT_PROXY_COMMAND environment variable are NOT set.
fatal: The remote end hung up unexpectedly
任何帮助都将是极好的。谢谢。
gh repo archive <repository>
可以帮助您:请参见下面的答案。 - VonC