每一種版本控制系統都以某種形式支持分支。使用分支意味着你能夠從開發主線上分離開來,而後在不影響主線的同時繼續工做。git
執行 git init 的時候,缺省狀況下 Git 就會爲你建立 master 分支。spa
建立分支命令:版本控制
git branch (branchname)
#建立新分支 testing $ git branch testing $ git branch * master testing
切換分支命令:code
git checkout (branchname)
合併分支命令:blog
git merge
刪除分支命令:開發
git branch -d (branchname)