Skip to content

Instantly share code, notes, and snippets.

@malhotrachetan
Created July 8, 2019 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malhotrachetan/7832165067e0dba43bd8bcc45029c6a2 to your computer and use it in GitHub Desktop.
Save malhotrachetan/7832165067e0dba43bd8bcc45029c6a2 to your computer and use it in GitHub Desktop.
Script to clean your commit history from git
git pull
git checkout --orphan temp_branch
git add -A
git commit -am "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