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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use
git bundleand email one single fileSee "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:
As Andreas mentions in the comments, Scott Chacon recently (March 2010) wrote a "cute" article on this topic in the ProGit book:
Git’s Little Bundle of Joy