Git 操作命令

創建本地倉庫添、遠程倉庫

cd
cd Desktop
mkdir remote 
cd remote 
git init --bare 

cd 
cd Desktop
mkdir local
cd local
git init
git remote add origin fie:///home/likai/Desktop/remote

查看當前的遠程庫

git remote -v 
#-v 是 --verbose 的簡寫

origin ssh://[email protected]/usr/share/nginx/html (fetch)
origin ssh://[email protected]/usr/share/nginx/html (push)

修改遠程倉庫

#修改 url
git remote set-url [shortname] [new url]

#修改 shortname
git remote rename [new shortname] [url]

刪除遠程倉庫

git remote [shortname]

Git - 遠程倉庫的使用

Git 忽略文件權限修改

#Git 默認會記錄文件權限的修改,可選擇關閉
git config core.filemode false

遠程分支
查看遠程分支

git branch -r  

刪除遠程分支

git branch -r -d origin/branch-name  
git push origin :branch-name 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章