• Wincent
    Menu
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Renaming a remote Git branchEdit

Created 3/17/2011, updated 5/18/2017
$ git checkout oldname
$ git checkout -b newname
$ git push origin newname # re-add as new branch
$ git push origin :oldname # delete old branch

See also

  • http://stackoverflow.com/questions/3981889/rename-remote-branch
  • git
  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell with Rust (with help from Git and Neovim).