Skip to content

Instantly share code, notes, and snippets.

@wereHamster
Created August 13, 2012 21:26
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 wereHamster/3344208 to your computer and use it in GitHub Desktop.
Save wereHamster/3344208 to your computer and use it in GitHub Desktop.
#!/bin/sh
# This script nukes the author (identity and time) of all commits since the
# given rev. This is useful if you want to disguise the true time when you
# wrote the commits, as a normal rebase will only reset the committer identity
# and time.
GIT_EDITOR="sed -i '' -e 's/pick/edit/g'" git rebase -i $1
while true; do
GIT_EDITOR=true git commit --amend --reset-author
git rebase --continue || exit 0
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment