Wipe git history

removing updates
coding
git
Author

Soumendra Dhanee

Published

March 3, 2020

$ git checkout --orphan future-master
$ git add -A  # Add all files and commit them
$ git commit -m "reinit"
$ 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
$ git gc --aggressive --prune=all  # remove the old files
Back to top