Created
October 27, 2017 05:10
-
-
Save sambos/6f9e8bbb60675aa1f5a2ee2fd147e36e to your computer and use it in GitHub Desktop.
removing history from git/github for sensitive data that is accidentally checked in
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
cd your to your cloned project | |
-- make sure you pull all the code from the repo before you lose it | |
git pull origin master | |
rm -rf .git | |
-- recreate from the contents | |
git init | |
git add . | |
git commit -m"initial" | |
git remote add origin your-git-url.git | |
git push -u --force origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment