Last active
January 12, 2020 14:01
-
-
Save jcalabres/955ab3ce531ea8de31cd4049e3d03044 to your computer and use it in GitHub Desktop.
Delete all commits from Git
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
git checkout --orphan latest_branch && \ | |
git add -A && \ | |
git commit -am "initial commit" && \ | |
git branch -D master && \ | |
git branch -m master && \ | |
git push -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment