Last active
April 3, 2019 23:57
-
-
Save framon/6319400 to your computer and use it in GitHub Desktop.
Insert commit as first, allowing rebase of initial commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git rebase -i --root