Skip to content

Instantly share code, notes, and snippets.

@mneuhaus
Created November 20, 2012 09:28
Show Gist options
  • Save mneuhaus/4116952 to your computer and use it in GitHub Desktop.
Save mneuhaus/4116952 to your computer and use it in GitHub Desktop.
Command to remove a specific commit from a git branch
git filter-branch --commit-filter '
if [ "$GIT_COMMIT" = "8daa495e5a6d1677334d6a29be353652dc3324e7" ];
then
skip_commit "$@";
else
git commit-tree "$@";
fi' 8daa495e5a6d1677334d6a29be353652dc3324e^1..HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment