Skip to content

Instantly share code, notes, and snippets.

@AdrianSchneider
Created March 19, 2012 21:55
Show Gist options
  • Save AdrianSchneider/2127452 to your computer and use it in GitHub Desktop.
Save AdrianSchneider/2127452 to your computer and use it in GitHub Desktop.

For some reason I'm getting an error when I try this... (first part)

output

Rewrite [hash....] (1/4)usage: git commit-tree <sha1> [(-p <sha1>)...] < changelog
could not write rewritten commit

pre-push script

git filter-branch --commit-filter /path/to/other/script

filter script

GIT_AUTHOR_NAME="safe_username"
GIT_AUTHOR_EMAIL="email@address.com"
GIT_COMMITTER_NAME="safe_username"
GIT_COMMITTER_EMAIL="email@address.com"
EMAIL="email@address.com"

sed 's/find/replace/' |
git commit-tree "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment