git: rename remote branch

Posted by Albert on Stack Overflow See other posts from Stack Overflow or by Albert
Published on 2009-10-06T16:51:57Z Indexed on 2010/12/24 4:54 UTC
Read the original article Hit count: 223

Filed under:
|
|
|

I have the branch master which tracks the remote branch origin/master.

I want to rename them to "master-old" both locally and remote. Is that possible? For other users who tracked origin/master (and who updated their local master branch always just via 'git pull'), what whould happen after I renamed the renamed the remote branch. Would their 'git pull' still work or would it throw an error that it coudln't find origin/master anymore?

Then, further on, I want to create a new master branch (both locally and remote).

Again, after I did this, what would happen now if the other users do the 'git pull' now?


I guess all this would result in a lot of trouble. Is there a clean way to get what I want? Or should I just leave master as it is and create a new branch master-new and just work there further on?

© Stack Overflow or respective owner

Related posts about git

Related posts about remote