本文介绍了我怎样才能给某人发送一个git仓库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾尝试过:

  strong>并发送一个单一文件 

请参阅

一旦收到,您可以克隆它或从中获取文件。



正如,您可能需要第一封电子邮件才能与所有分支进行捆绑销售:

  $ git包create / tmp / foo-all --all 

As 在评论中提到, 最近(2010年3月)在


I have tried:

git archive HEAD --format=zip > archive.zip

: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 git bundle and email one single file

See "backing up project which uses git"

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:

$ git bundle create /tmp/foo-all --all

As Andreas mentions in the comments, Scott Chacon recently (March 2010) wrote a "cute" article on this topic in the ProGit blog:

Git's Little Bundle of Joy

这篇关于我怎样才能给某人发送一个git仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 20:55