Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Insert commit as first, allowing rebase of initial commit
# first you need a new empty branch; let's call it `newroot`
git checkout --orphan newroot
git rm -rf .
# then you apply the same steps
git commit --allow-empty -m 'root commit'
git rebase --onto newroot --root master
git branch -d newroot
@bef178

This comment has been minimized.

Copy link

bef178 commented Dec 1, 2017

git rebase -i --root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.