1、查看遠(yuǎn)程分支
? ? ? ? ?git?branch?-a
2、查看本地分支
? ? ? ?git?branch
3、創(chuàng)建分支
? ? ? git?branch?
4、切換分支到
? ? ?git?checkout
5、刪除本地分支
? ? ?git??branch -d
6、查看本地和遠(yuǎn)程分支-a。前面帶*號(hào)的代表你當(dāng)前工作目錄所處的分支
? ? ? ?remotes/origin/HEAD?->?origin/master?#在clone完成之后,Git會(huì)自動(dòng)為你將此遠(yuǎn)程倉(cāng)庫(kù)命名為origin
? ? ? ?查看origin別名的git地址:git remote -v
7、刪除遠(yuǎn)程版本
? ? ? ?git?push?origin?:分支版本
8、刪除遠(yuǎn)程分支
? ? ? ?git branch -r -d origin/<branch_name>
? ? ? ?git?push?origin?:<branch_name>
9、本地分支與遠(yuǎn)程分支關(guān)聯(lián):
? ? ? ? ? git pull origin本地分支
? ? ? ? git fetch --all
? ? ? ?git reset --hard origin/master
? ? ? ? git pull