搭建一个简单Git服务器

1.在PC上创建一个git空仓库
# mkdir -p /home/git_test
# cd git_test
# git init --bare test.git //test.git目录被clone下来就是test目录


2.在同一个PC上clone下来,并添加文件操作
# cd /home
# git clone [email protected]:/home/git_test/test.git
# ls 
test
# cd test
# git add 1.txt 2.txt
# git commit -m "First commit"
# git push origion master

注意:不同之间PC搭建和clone也是同理一样的
发布了766 篇原创文章 · 获赞 474 · 访问量 254万+

猜你喜欢

转载自blog.csdn.net/u010164190/article/details/105514212