Created
April 27, 2022 22:02
-
-
Save diva-D/88a0a46f06303c3ec4d7852582089311 to your computer and use it in GitHub Desktop.
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
# git only | |
git rm -r --cached .env | |
# commit and push to delete (but still in previous history) | |
# remove from Github history | |
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD | |
git push --force | |
# file still there but content will be empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment