Created
October 19, 2017 18:43
-
-
Save JenZhao/786c7f6c4ba03a2cf865e07645c5d9ef to your computer and use it in GitHub Desktop.
Delete all your commit history and keep the code in its current state
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