Best way to share a git repo between home and work PCs?

5

I have a git repo on both my home and work computer. Both of these repos get pushed to a TFS server via git-tfs, but that's irrelevant. The big problem I'm having is because I can't just push to the main repo it's not easy to share unpushed work between my home and work computers. So, I need some way of sharing a git repo from my work computer to my home computer. Both are running Windows 8 and have cygwin configured(which is how I use git). What is my best bet for this? Ideally, it'd require very little setup and be simple to do a "one-off" sync

Earlz

Posted 2013-02-04T20:23:15.633

Reputation: 3 966

Answers

4

Here's another way that's reasonably secure but is really "the Linux way" (kind of hard to avoid since you're using a program whose Windows "port" is not really a native port):

  1. Set up an SSH server on one box that gives you the Cygwin shell (openssh-server)
  2. Make sure you have port forwarding set up or a static IP so your SSH server is listening on the public internet
  3. Use git push from your client box to your server using the protocol schema ssh:// and your auth details.

allquixotic

Posted 2013-02-04T20:23:15.633

Reputation: 32 256

I didn't know there was a (good) SSH server for Windows heh. – Earlz – 2013-02-04T20:48:08.460

1http://www.noah.org/ssh/cygwin-sshd.html – allquixotic – 2013-02-04T20:49:23.483

http://www.bitvise.com/winsshd – user1686 – 2013-02-04T21:52:02.697

0

If you don't mind using a webservice, Bitbucket is hard to beat for simplicty. It works with either Git or Mercurial, and it's free. It also has an excellent setup tutorial, though given the content of your post, you may be beyond needing it =).

PingZing

Posted 2013-02-04T20:23:15.633

Reputation: 131

I'd love to use bitbucket(it's where I host most stuff), but it's proprietary code that my company doesn't want to host outside of the company – Earlz – 2013-02-04T20:49:01.220