Git: change main branch?

Let's say I have these git branches:

master
branchone

I want to do this while keeping the whole story intact:

master -> oldmaster
branchone -> master
+5
source share
1 answer

You can use git branch -m.

git branch -m master tmpbranch
git branch -m branchone master
git branch -m tmpbranch branchone
+7
source

All Articles