在一台机器(IP地址192.168.1.2)上,我创建了一个Git存储库
$ cd /home/hap/working
$ git init
$ (add some files)
$ git add .
$ git commit -m 'Initial commit'
Run Code Online (Sandbox Code Playgroud)
我在同一个Wi-Fi网络上有另一台机器.如何从其他机器克隆?
Jos*_*iah 81
您需要使用git + ssh URL来执行Git克隆:
git clone git+ssh://hap@192.168.1.2/~/working
Run Code Online (Sandbox Code Playgroud)
要打破它:
git+ssh
告诉Git你想使用ssh连接到Git存储库.hap
是您的用户名(我假设您的问题基于主目录).192.168.1.2
是您要连接的机器~/working
是远程计算机上Git存储库的路径(~
主目录也是如此)其他一些注意事项:
hap
归档时间: |
|
查看次数: |
39784 次 |
最近记录: |