首页
IT
登录
6mi
u
盘
搜
搜 索
IT
centos7 最简单的git服务器与客户端使用例子
centos7 最简单的git服务器与客户端使用例子
xiaoxiao
2021-03-26
23
需求: 在192.168.136.128的/home/git/目录下建立一个test.git的资源库. 开发人员1提交一个1.txt的文件资源库 开发人员2修改1.txt增加一行内容abc.并提交.
服务器端(centos7) 1.先git一下,检查git是否已经安装,如果没有则. yum – y install git 2.adduser git password git 3.cd /homt/git/ git init --bare test.git 开发人员1(windows下使用的git bash工具): 1.git clone git@192.168.136.128:/home/git/test.git 2.cd test vi 1.txt 3.git add 1.txt git commit -m "add 1.txt" git push 开发人员2:(与开发人员1操作相同) 1.git clone git@192.168.136.128:/home/git/test.git 2.cd test vi 1.txt //修改内容,增加abc. 3.git add 1.txt git commit -m "add 1.txt" git push #如中途遇到任何问题,可以咨询我. 1.push的时候,如果需要email或者username,请填写.
转载请注明原文地址: https://ju.6miu.com/read-662137.html
技术
最新回复
(
0
)