shi*_*eck 5 git version-control github localhost
我的本地 GitHub 存储库位于C:\Users\my\Documents\GitHub , C:\wamp\www是我使用 Wampserver 在本地处理项目的位置。
与他们一起工作的适当设置是什么?我应该告诉 Git 使用“www”作为我的本地存储库吗?这会将 localhost 与 Github 结合起来吗?
您可以简单地使用 git 的 --work-tree 或 --git-dir 参数来:
位于 Github 文件夹中,但要提到工作树是 www
cd C:\Users\my\Documents\GitHub
git --work-tree=C:\wamp\www status
Run Code Online (Sandbox Code Playgroud)或者在 www 文件夹中并提及 git 存储库位于 Github 中
cd C:\wamp\www status
git --git-dir=C:\Users\my\Documents\GitHub\.git
Run Code Online (Sandbox Code Playgroud)另一种方法是在两者中都有一个 git 存储库,并Github从www.
cd C:\wamp\www status
git add remote origin C:\Users\my\Documents\GitHub
git pull origin master
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6476 次 |
| 最近记录: |