Skip to content

Instantly share code, notes, and snippets.

@TonyStark
Last active May 16, 2024 07:22
Show Gist options
  • Save TonyStark/6f872c881adb72f80bcf4b8bf929fe36 to your computer and use it in GitHub Desktop.
Save TonyStark/6f872c881adb72f80bcf4b8bf929fe36 to your computer and use it in GitHub Desktop.
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD
git push --force
OR
git filter-branch --index-filter 'git rm --cached --ignore-unmatch .env' -- --all
git push -f origin <branch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment