我怎样才能给某人发送一个git仓库? [英] How can I email someone a git repository?
问题描述
我曾尝试过:
git archive HEAD --format = zip> archive.zip
:然后我将email archive.zip放到另一端,然后解压缩archive.zip到一个文件夹中。但是,当他们尝试任何git命令时,他们发现这不会产生有效的git存储库。 您可以使用 请参阅备份使用git的项目 git包只是一个文件,它可以非常容易创建并再次导入,因为它可以像另一个远程处理。 一旦收到,您可以克隆它或从中获取文件。 正如 github的备份repo ,您可能需要第一封电子邮件才能与所有分支进行捆绑销售: As Andreas 在评论中提到, Scott Chacon 最近(2010年3月)在 ProGit博客: I have tried: :and then I email archive.zip and at the other end they unzip archive.zip into a folder. But when they try any git commands they find out that this does not produce a valid git repository You could use See "backing up project which uses git" A git bundle is just one file which can be very easily created and again imported as it can be treated like another remote. Once received, you can clone it or fetch from that file. As mentioned in "Backup of github repo", you will probably want for the first email to make your bundle with all branches: As Andreas mentions in the comments, Scott Chacon recently (March 2010) wrote a "cute" article on this topic in the ProGit blog: 这篇关于我怎样才能给某人发送一个git仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! git bundle
strong>并发送一个单一文件
$ git包create / tmp / foo-all --all
git archive HEAD --format=zip > archive.zip
git bundle
and email one single file
$ git bundle create /tmp/foo-all --all