Skip to content

Instantly share code, notes, and snippets.

@zed-wong
Created June 12, 2022 06:23
Show Gist options
  • Save zed-wong/3469a1c9de22f37fb8d788887082ca5c to your computer and use it in GitHub Desktop.
Save zed-wong/3469a1c9de22f37fb8d788887082ca5c to your computer and use it in GitHub Desktop.
Remove file from git history
git filter-branch --index-filter \
'git rm -rf --cached --ignore-unmatch path_to_file' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment