Created
September 7, 2016 06:51
-
-
Save eriksimonic/70dc9f627e2376a80e6c84507526738f to your computer and use it in GitHub Desktop.
Remove all history 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 newBranch | |
git add -A # Add all files and commit them | |
git commit | |
git branch -D master # Deletes the master branch | |
git branch -m master # Rename the current branch to master | |
git push -f origin master # Force push master branch to github |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reminder for.
http://stackoverflow.com/questions/9683279/make-the-current-commit-the-only-initial-commit-in-a-git-repository