ブランチ
作業領域を枝のように分岐させ、プロジェクト本体に影響を与えず、複数人が同時に開発する機能ブランチ作成
$ git branch 作成ブランチ名
$ git branch 作成ブランチ名 * master ←現在のブランチ
ブランチの移動
$ git checkout 作成ブランチ名 Switched to branch '作成ブランチ名'
ブランチ作成 + 移動
$ git checkout -b 作成ブランチ名 Switched to a new branch '作成ブランチ名'
ブランチをマージ(元のブランチへ統合)
「master」ブランチへ移動後、
$ git merge 統合ブランチ名
マージの取り消し 未コミット
$ git reset --hard HEAD^ HEAD is now at 4e13c87 Merge branch '取消ブランチ名'
マージの取り消し コミット済み
$ git reset --hard ORIG_HEAD
ブランチ 削除 マージ済み
$ git branch -d 削除ブランチ名
ブランチ 削除 その他
$ git branch -D 削除 ブランチ名