Just like the post you linked to, this should only be done if you haven't push
ed master
anywhere.
First, create a new branch from master
with git branch new-branch master
. You should end up with
.----------E (no branch)
/ /
----A---B---C---D (master) (new-branch)
Now, move master to E
with
git checkout master
git reset --hard E
Your final network should look something like
.----------E (master)
/ /
----A---B---C---D (new-branch)