LoginSignup
0
0

More than 5 years have passed since last update.

[Gitの使い方]ブランチ名の変更

Posted at

Why?

単純にブランチ名が適当じゃない時に、変更したいから。
例えば、以下のような状況がありえると思います。
1. チケットの作業する前にまずリファクタリングして見た。
2. そしたら思いの外リファクタリングが多くなった。チケット作業とリファクタリングを同時に出すのは違うなって思った。
3. チケット作業のためのブランチ名にしていたけど、リファクタリングのためのブランチ名にしたい。チケット作業用のブランチは別に作りたい。

How

change branch name
$ git branch -m <old_name> <new_name>

今開いているブランチ名を変更する時はもっと簡単で以下のようにするとできます。

change current_branch name
$ git branch -m <new_name>

0
0
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
0
0