LoginSignup
0
1

More than 5 years have passed since last update.

Gitでブランチ名をサクッと3つの変える手順

Posted at

単なる備考録です。お役に立てれば。

1.ローカルのブランチ名を新しく変更する

$ git branch -m old_branch new_branch

2.古い方のリモートのブランチを削除する

$ git push origin :old_branch

3.変更済の新しいローカルブランチをリモートにpushする

$ git push origin new_branch

最後に$ git branch -aでブランチの一覧をチェックする。

ちなみに現在いるブランチ名(old_branch)を変更する場合は
$ git branch -m new_branchとすればOK。

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