Created
November 26, 2019 15:48
-
-
Save Pamblam/3535257a93d36a1e5fd7a1adc4378daa to your computer and use it in GitHub Desktop.
Delete git repo history
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
#!/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