ブランチの一覧
git branch -a
現在のブランチ確認
git branch
ブランチを切る
git push -u origin 作成したブランチ名
ブランチを切り替える
git checkout ブランチ名
フェッチ
git fetch origin #リモートリポジトリの最新情報取得
リベース
git checkout ブランチ名
git rebase master
スタッシュ
git stash #メッサージなし
git stash save 名前 #メッサージ付き
スタッシュリスト
git stash list
n番目のスタッシュを確認
git stash show stash@{N}
スタッシュを適用
git stash apply # 最新のスタッシュを適用し、残す
git stash apply stash@{N} # N番目のスタッシュを適用し、残す
スタッシュを適用し、スタッシュを削除
git stash pop # 最新のスタッシュを適用し、削除
git stash pop stash@{N} # N番目のスタッシュを適用し、削除