0

Is it possible to rename a remote git branch if work has been pushed to it already?

Master
development-branch

branch 1 
branch 2
branch 3

All the above branches have been pushed up to development. Can I rename development-branch to development?

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
CrisA
  • 45
  • 2
  • 10
  • 3
    Possible duplicate of [Rename master branch for both local and remote Git repositories](https://stackoverflow.com/questions/1526794/rename-master-branch-for-both-local-and-remote-git-repositories) – Tim Biegeleisen Dec 21 '17 at 10:14
  • Rename the local branch to `development`, then delete the old `development-branch` on the remote, and finally push `development`. – Tim Biegeleisen Dec 21 '17 at 10:14

1 Answers1

2

You can do

git -m development-branch development

more details here https://git-scm.com/docs/git-branch#git-branch--m https://multiplestates.wordpress.com/2015/02/05/rename-a-local-and-remote-branch-in-git/

Yalamber
  • 7,360
  • 15
  • 63
  • 89