刪除當(dāng)前路徑下的 git倉庫
?rm -rf .git/?
Git分支
git branch
git查看狀態(tài)
git status
添加文件
git add .
關(guān)聯(lián)遠(yuǎn)程路徑
git remote add origin“路徑”
移除遠(yuǎn)程關(guān)聯(lián)
git remote rm origin
查看路徑
pwd
上層路徑
cd ..
提交代碼
git commit -m "初始化"
日志
git log
列出所有遠(yuǎn)程分支
git remote -v
Push到遠(yuǎn)程服務(wù)器
git push origin master
回到根路徑
cd —
查看ssh文件夾
cd .ssh/
查看ssh秘鑰
cat id_rsa.pub
生成ssh文件
ssh-keygen -t rsa -C "493506332@qq.com"
刪除秘鑰
rm id_rsa id_rsa.pub
提交代碼到碼云
cd+你要上傳的工程所在目錄,最簡單的辦法就是要把你上傳的工程直接拖進(jìn)來
git init? //初始化git
git add .? ? //添加
git commit -m "你要添加的日志"可以不寫
git remote add originhttps://github.com/xxx/xxx? 和自己的倉庫簡歷遠(yuǎn)程連接,鏈接可以在你的github倉庫中獲得
git pull orgin master? ? //從master分支拉取數(shù)據(jù)
git push -u origin master? //將代碼推送到master