简体   繁体   English

在Linux中设置git服务器和客户端

[英]git server and client set up in linux

i am new to git and now i am trying to set up a git server and want to access the server from client. 我是git的新手,现在我正在尝试设置git服务器,并希望从客户端访问服务器。

referred many links but those are not helping me. 提到了许多链接,但这些链接对我没有帮助。 i tried with the link http://davedevelopment.co.uk/2010/12/05/how-to-install-gitolite-on-ubuntu-10-10-maverick-meerkat.html . 我尝试了链接http://davedevelopment.co.uk/2010/12/05/how-to-install-gitolite-on-ubuntu-10-10-maverick-meerkat.html after the final step in the document i didn't know how to proceed. 在文档的最后一步之后,我不知道如何进行。

can anyone give the details? 谁能提供详细信息? thanks in advance. 提前致谢。

if you have cloned a repository on your client you are ready to start coding... 如果您已在客户端上克隆了存储库,则可以开始编码了。

git commit

to commit changes locally, and 在本地提交更改,以及

git push

to push your changes to the server. 将您的更改推送到服务器。

What is missing on the above answers is how to push on the server a new repo. 上面的答案缺少的是如何在服务器上推送新的仓库。

Suppose that in the gitolite config file you have a repo named my_repo, you can add to the server an existing local repo this way: 假设在gitolite配置文件中有一个名为my_repo的存储库,可以通过以下方式将现有的本地存储库添加到服务器:

cd my_repo
git remote add gitolite git@your.git.server:my_repo
git push gitolite master

You have to type ONLY ONCE the second line above. 您只需键入上面第二行即可。 After that, you only have to push. 之后,您只需要推动即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM