Skip to content

Instantly share code, notes, and snippets.

@vshank77
Last active October 25, 2015 22:51
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 vshank77/3ad18cf674f82bf94acd to your computer and use it in GitHub Desktop.
Save vshank77/3ad18cf674f82bf94acd to your computer and use it in GitHub Desktop.
git filter branch
git filter-branch --commit-filter '
if [ "$GIT_COMMIT" = "FULL_SHA" ];
then
skip_commit "$@";
else
git commit-tree "$@";
fi' HEAD
git filter-branch --index-filter 'git rm --cached --ignore-unmatch FILE_NAME' -f HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment