Open1

【Git】switch

seiya2130seiya2130

git chckoutと異なり、ブランチの切り替え操作に特化したコマンド

  • ブランチ切り替え
git switch <ブランチ名>

masterブランチに移動

  • ブランチを新規作成
git switch -c <作成するブランチ>

masterブランチからtestブランチ作成

  • 指定したブランチからブランチを新規作成
git switch -c <作成するブランチ> <作成元のブランチ>

feat/modelからtest2ブランチ作成

参考

https://git-scm.com/docs/git-switch