用戶信息
git config --global user.name "penghaitao"
git config --global user.email penghaitao918@163.com
新項(xiàng)目
git init
git add *
git commit -m "first commit"
git remote add origin https://github.com/penghaitao918/PROJECT.git
git push -u origin master
分支操作
- 上傳某個(gè)本地tag
git push origin [tag_name]
- 上傳本地所有tag
git push origin --tags
Error
dst refspec xxxx matches more than one. failed to push some refs to a http://xxxxxxx
當(dāng)遠(yuǎn)程倉(cāng)庫(kù)同時(shí)存在相同名稱(chēng)的 branch 和 tag 時(shí),不指明絕對(duì)路徑的前提下,操作這個(gè)名稱(chēng)的 branch 和 tag 都會(huì)出現(xiàn)這個(gè)問(wèn)題。
//刪除dev_test 分支
git push origin :refs/heads/dev_test
//刪除dev_test 標(biāo)簽
git push origin :refs/tags/dev_test