- ロカールブランチ名変更
# カレントブランチに入っている場合
$ git branch -m new-branch-name
# OR
# カレントブランチに入っていない場合
$ git branch -m old-branch-name new-branch-name
- リモートリポジトリブランチ名変更
$ git push origin :old-branch-name new-branch-name
More than 5 years have passed since last update.
# カレントブランチに入っている場合
$ git branch -m new-branch-name
# OR
# カレントブランチに入っていない場合
$ git branch -m old-branch-name new-branch-name
$ git push origin :old-branch-name new-branch-name
Register as a new user and use Qiita more conveniently