Skip to content

Instantly share code, notes, and snippets.

@eriksimonic
Created September 7, 2016 06:51
Show Gist options
  • Save eriksimonic/70dc9f627e2376a80e6c84507526738f to your computer and use it in GitHub Desktop.
Save eriksimonic/70dc9f627e2376a80e6c84507526738f to your computer and use it in GitHub Desktop.
Remove all history from git.
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