Skip to content

Instantly share code, notes, and snippets.

@fischerscode
Last active July 3, 2020 14:45
Show Gist options
  • Save fischerscode/27b30f8a97efff92396631345954c84e to your computer and use it in GitHub Desktop.
Save fischerscode/27b30f8a97efff92396631345954c84e to your computer and use it in GitHub Desktop.
Remove a file from git startingfrom a specified commit
git filter-branch -f --index-filter "git rm -rf --cached FILENAME" --tag-name-filter cat -- ^COMMIT_HASH_SHORT^ --branches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment