如何设置PC和Mac使用git

如何设置PC和Mac使用git

问题描述:

我使用git的Mac和PC。

I use git both for Mac and PC.

当从PC中拉取Mac的git时,很容易使用ssh。

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

git clone smcho@prosseek:~/smcho/setup


b $ b

问题发生在另一个方向:从Mac拉。我想有两种方法。

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

服务器'在Mac,我可以使PC的目录像Mac的。即使文件权限问题,它仍然有效很不错。

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.

我可以运行cygwin ssh server(cygrunsrv -S sshd)其他计算机,但对我来说,我必须等待一段时间才能获得连接,因为我解释了此处。它几乎不可能使用它与git,因为我不想等待分钟克隆。

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.

这里有我的问题。


  • 上面两种方法?

  • 是否有一种(自然的)方式来支持从Windows(正确的Windows 7)不使用cygwin的ssh服务器?

还有一个选项:

要保持存储库同步,您可以创建一个裸存储库,并使用像Dropbox来同步它。

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.