This commit is contained in:
Jay Phelps 2016-02-05 17:27:56 -08:00
commit a9b46e4e09
3 changed files with 35 additions and 0 deletions

12
git-blame-someone-else Normal file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
AUTHOR=$1
COMMIT=$(git rev-parse --short $2)
{
GIT_SEQUENCE_EDITOR="sed -i -e 's/^pick $COMMIT/edit $COMMIT/'" git rebase -i $COMMIT~1^^
git commit --amend --no-edit --author="$AUTHOR"
git rebase --continue
} &> /dev/null
echo "$AUTHOR is now the author of $COMMIT. You're officially an asshole.";