Skip to content

Instantly share code, notes, and snippets.

@radixm46
Forked from naosim/renameGitBranch.md
Created March 6, 2018 00:12
Show Gist options
  • Save radixm46/fd55d672e15576a81d2913c3fca0ef6a to your computer and use it in GitHub Desktop.
Save radixm46/fd55d672e15576a81d2913c3fca0ef6a to your computer and use it in GitHub Desktop.
ローカルとリモートのブランチ名を変更する

#ローカルとリモートのブランチ名を変更する

以下、ブランチ名を hoge から foo に変更する例

  • ローカルのブランチ名変更
git branch -m hoge foo
  • リモートのブランチを消す
git push origin :hoge
  • 変更済みローカルブランチをプッシュ
git push origin foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment