如何在本地网络上设置Git? [英] How to setup Git on local network?
本文介绍了如何在本地网络上设置Git?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我下载了Git安装程序并尝试在我的网络中安装电脑。我搜索了这个过程,但是我发现它用于在github.com上在线托管代码。我发现了一些链接,但没有完成整个过程。
I downloaded Git setup and trying to setup for computers in my network. I searched for the process but I found it for to host code on line on github.com. I found a few links but there is not the whole process.
我知道如何推拉。
推荐答案
创建一个新的存储库
To create a new repository
- git bash或手动创建
-
用户以下命令创建存储库
- Create directory using git bash or create manually
User following commands to create repository
cd /repo/path/projectname.git
git init --bare
After初始化目录共享目录并将所有权限授予本地组
创建本地工作区
-
为本地用户或其他计算机使用以下命令以相同顺序创建另一个本地存储库
Create another local repository for local user or other computer use following commands in same order
cd ~/workspace/local/path
git init
git clone user@gitserver:/path/to/your/folder
git add origin repo/path
git add .
git status
git commit
这篇关于如何在本地网络上设置Git?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文