Skip to content

Instantly share code, notes, and snippets.

@fedek6
Created October 12, 2022 13:26
Show Gist options
  • Save fedek6/beff8cc8659c33636506f310a8769552 to your computer and use it in GitHub Desktop.
Save fedek6/beff8cc8659c33636506f310a8769552 to your computer and use it in GitHub Desktop.
Remove a file from git history
git log path_to_file
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