深圳網(wǎng)站開發(fā)學(xué)習(xí)日本積分榜最新排名
搭建git服務(wù)器(本地局域網(wǎng))
創(chuàng)建倉庫
(假定在/home/git
目錄下創(chuàng)建倉庫)
git init --bare sample.git
克隆遠(yuǎn)程倉庫到本地
git clone git@192.168.0.100:/home/git/sample.git
已有項(xiàng)目,綁定遠(yuǎn)程倉庫
# 查看遠(yuǎn)程倉庫綁定
git remote -v# 解除遠(yuǎn)程倉庫綁定
git remote -remove origin# 綁定遠(yuǎn)程倉庫
git remote -add origin git@192.168.0.100:/home/git/sample.git
推送
# 查看本地更改
git status# 添加更改
git add -u# 提交更改
git commit -m "提交說明"# 推送
git push origin master
拉取
git pull origin master