Skip to content

Instantly share code, notes, and snippets.

@polonskiy
Created September 22, 2015 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polonskiy/0992613fdeedcdbfeb83 to your computer and use it in GitHub Desktop.
Save polonskiy/0992613fdeedcdbfeb83 to your computer and use it in GitHub Desktop.
remove file from git
#!/bin/bash
git filter-branch --prune-empty --index-filter "git rm --cached -f --ignore-unmatch $1" --tag-name-filter cat -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment