Skip to content

Instantly share code, notes, and snippets.

@Pamblam
Created November 26, 2019 15:48
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 Pamblam/3535257a93d36a1e5fd7a1adc4378daa to your computer and use it in GitHub Desktop.
Save Pamblam/3535257a93d36a1e5fd7a1adc4378daa to your computer and use it in GitHub Desktop.
Delete git repo history
#!/usr/bin/env bash
REMOTE=$(git config --get remote.origin.url)
rm -rf .git
git init
git add .
git commit -m "Deleted repo history"
git remote add origin $REMOTE
git push -u --force origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment