使用GIT从windows机器克隆到linux webserver(内部)

Cla*_*els 4 linux git

好的,我正在寻找一种方法来使用GIT在我的本地机器(git存储库)和我的网站(存储库的git clone)之间保持最新的网站.

我已初始化存储库(在Windows 7机器上)并将所有文件添加到本地计算机上的存储库中.我现在需要将repo转到webswerver(基于linux的机器).我可以通过putty和ssh访问网络服务器.如何将repo克隆到适当的目录中以服务该网站?

我从我的基于linux的机器上尝试了以下内容:git clone git + ssh://myuser@10.1.0.135/d/webserver/htdocs/repo

我一直收到连接主机10.1.0.35端口22:连接超时

这两台机器都在内部,网络服务器位于不同IP范围(防火墙外)的网络之外.我来自subversion,可以很容易地在网络服务器和我的机器上提交/更新.

感谢您的任何指导!

Cla*_*ick 8

我找到的最好的资源就是这里.

我遇到的问题是使用上述建议从*nix环境发出git clone无法正确找到repo的路径.

我能够通过使用--base-path和--export-all params启动git守护进程来解决这个问题.

所以,从windows框:

git daemon --base-path=C:/source/ --export-all
Run Code Online (Sandbox Code Playgroud)

然后从*nix框(我的情况下是mac):

git clone git://<local ip>/<project name>
Run Code Online (Sandbox Code Playgroud)

我在Windows框中的目录结构是:

c:\source\<project name> - this is where the .git folder lives
Run Code Online (Sandbox Code Playgroud)