views:

57

answers:

4

I use git both for Mac and PC.

When pulling Mac's git from PC, it's easy as I can use ssh.

git clone smcho@prosseek:~/smcho/setup

The problem happens the other way round : to pull from Mac. I guess there are two ways to go.

Method 1 : Connect to server

By using 'connect to server' in Mac, I can make PC's directory like that of Mac. Even though, the file permission issue, it works pretty well.

Method 2 : ssh

I could run cygwin ssh server (cygrunsrv -S sshd) to be accessed from other computers, but for me, I have to wait quite a while to get connection as I explained here. It's almost impossible for to use it with git, as I don't want to wait for minutes to get clone.

Here comes my question.

  • Is there any better way other than the previous two methods?
  • Is there a (natural) way to support ssh server from Windows (windows 7 precisely) not using cygwin?
+1  A: 

You might consider another approach entirely. If you're using git as a revision control system that you might consider a hosted account for mastering your repository, maintaining backups, etc. http://github.com/ is the leader in the space for git.

Chris Alef
+1  A: 

I see two other solutions :

  • using a third synchronisation server: GitHub, the most famous (if your program is OpenSource), but you can also find free online private Git repositories
  • on Windows, you can set up the Git server ('git daemon' command). On MAC, you'll access to the Windows repository using the URL git://ip_of_windows_machine/repository/
Benoit Courtine
+2  A: 

There is even another option:

If you use both computers for developing and just want to keep the repositories in sync, you could create a bare repository and use something like Dropbox to synchronize it.

Felix Kling
@Felix : Dropbox is pretty cool! Thanks!
prosseek
Has this worked for you? Leaving my repository sync'ing to drop box would make me very nervous.
Alan Jackson
@Alan Jackson: Actually I have not tried it yet, but I plan to do it (I read some articles that proposed this setup). Note that mentioned to use a bare repository, not a "normal" one (so it would be your private "GitHub" repository without GitHub ;)). Otherwise the files get up-/downloaded every time you do a checkout. But if one doesn't care... Dropbox seems to be pretty reliable, why would you be nervous?
Felix Kling
+3  A: 

I've started using the philosophy of trying to stick in the native environment that something is designed for.

With that in mind, my windows box has an ubuntu server virtual machine that hosts my git repositories. The nice thing is the linux + virtual box + git is an awesome source repository that is completely free. No extra machine and you can give it very little memory so it isn't a resource hog.

Alan Jackson
+1 Virtual machines rock :)
Felix Kling