1

I am currently away from home, but have my work laptop with my. On it, I have a Git repo that I created because I am the only one who really does anything on this particular project.

I shared the folder and gave my coworker the rights to clone the git repo to his machine (as a remote branch)

He now needs my latest changes, normally he would do a git pull. This is not possible because I have no VPN right now and he cant connect via unsecured channels.

Is there a way to export the repo (and host it encrypted somewhere on the web) so that he can just download, unpack and import it? I want there to be no difference in the result than as if we were working normally. Also we have to be able to continue working on it together after I am back at work.

-edit- I should add that the repo is currently very small

buddybubble
  • 1,269
  • 14
  • 33

2 Answers2

5

The git-way would be to use a bundle.

See "Git's Little Bundle of Joy" (and git bundle man page):

  • this would generate only one file (easier to transfer/copy around)
  • your user can clone or fetch from it (like it was a regular repo): no need to unzip.

Once an initial complete bundle has been sent, you can send incremental bundles for subsequent changes.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

You can simply zip up your .git folder, encrypt it and send it via Email.

Daniel Hilgarth
  • 171,043
  • 40
  • 335
  • 443
  • A more space efficient option for large repos is to encrypt patches in a zip file. Note, however, that certain organizations like the NSA might actually have the algorithms or hardware necessary to break the encryption on a zip file (depending on what kind of encryption you use). PGP/GPG with large keys might be a safer option, in my non-expert speculation. –  Sep 11 '13 at 06:31
  • and he would just replace his .git folder with it? So no git commands involved at all, just replacing everything to create an exact clone? – buddybubble Sep 11 '13 at 06:32
  • 1
    @buddybubble: That really depends on whether he has local changes or not. I would actually extract it to a different folder and add it as a remote. – Daniel Hilgarth Sep 11 '13 at 06:35