我怎样才能给某人发送一个git仓库? [英] How can I email someone a git repository?

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

问题描述

我曾尝试过:

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

:然后我将email archive.zip放到另一端,然后解压缩archive.zip到一个文件夹中。但是,当他们尝试任何git命令时,他们发现这不会产生有效的git存储库。 您可以使用 git bundle strong>并发送一个单一文件

请参阅备份使用git的项目


git包只是一个文件,它可以非常容易创建并再次导入,因为它可以像另一个远程处理。


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



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

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

As Andreas 在评论中提到, Scott Chacon 最近(2010年3月)在 ProGit博客



Git的小礼包


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"

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:

$ 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仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆