LoginSignup
2
2

More than 5 years have passed since last update.

Git ブランチの「作成」->「チェックアウト」をワンラインで実行する

Last updated at Posted at 2017-01-23

通常のコマンド

gitでbranchを作成してそのbranchをcheckoutする場合には通常以下の2工程が必要となります。

makeBranchAndCheckout.sh
$git branch testBranch
$git checkout testBranch

ワンラインのコマンド

branchの作成、checkoutをセットで行いたい場合は以下のコマンドを使うとスマートです。

oneLine.sh
$git checkout -b testBranch

参考URL

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2