I have 2 branches: master and branch1 both in local and remote repository.
Now I’d like to rename branch1 to master, and master to branch1. I found ‘git -m’ will do this work in local. How about the remote repository? And how will it affect other users?
UPDATE
Thanks for your advice, I decided to fork a new branch from master, and merge my branch to master, to avoid the confusing.
You’re going to have a bunch of ambiguous branch name errors and impossible merges for anyone who decided to branch after you created branch1 or pulled from you after that. You’d also have to force the push to the server and probably manually delete branch1 off the server.
You’d be much better off checking out master and merging the two branches together, then pushing to the remote repository.
Also, I’m looking through the latest reference pages for git, I can’t seem to find a
-margument for justgit…