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

gitnetworkingwindowswindows 8

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

Best Answer

  • 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.
  • Related Question