fancy
fancy

Reputation: 51463

Git: Change master branch?

Say I have these git branches:

master
branchone

I want to do this, keeping all history intact:

master -> oldmaster
branchone -> master

Upvotes: 5

Views: 814

Answers (1)

CB Bailey
CB Bailey

Reputation: 793099

You can use git branch -m.

git branch -m master tmpbranch
git branch -m branchone master
git branch -m tmpbranch branchone

Upvotes: 7

Related Questions