分支操作
(1) 刪除遠程分支
$git remote add origin ssh://git@xxx.git ##如果未連接遠程分支要先連接 $git push origin :<remote branch name>
(2)?從遠程倉庫里拉取一條本地不存在的分支,將會自動創建一個新的本地分支,并與指定的遠程分支關聯起來,同時自動切換到這個分支
$git checkout -b <local branch name> origin/<remote branch name>
?(3)?更新Master分支(例master分支下更新到V1.1)
git高級用法、
$git checkout master $git merge V1.1 $git push
?(4)?在當前分支的基礎上創建一個新分支,并push到遠程
$git branch <new branch name> $git push origin <new branch name>
?(5)?回滾版本
$git reset --hard <comment hash> $git push -f origin <branch>
?(6)?在某個commit version上創建分支
$git checkout -b <new branch name> <comment hash> $git push origin <new branch name>
?