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 开发者_如何学Gothe 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?
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.
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.
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/
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.
精彩评论