From: Banana Date: Wed, 11 Nov 2015 11:03:01 +0000 (+0100) Subject: git stuff. X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=f34fe6e86331e24cfe43ca242779887789c10559;p=klimbim.git git stuff. rewrite git author --- diff --git a/git/README b/git/README new file mode 100644 index 0000000..3d38c84 --- /dev/null +++ b/git/README @@ -0,0 +1 @@ +Stuff usefull while working with git. diff --git a/git/git-rewrite-author.sh b/git/git-rewrite-author.sh new file mode 100755 index 0000000..aef33cc --- /dev/null +++ b/git/git-rewrite-author.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# copywrite by Johannes 'Banana' Keßler 2015 + +git filter-branch --env-filter ' +OLD_EMAIL="OLD OR INVALID EMAIL" +CORRECT_NAME="NEW AUTHOR NAME" +CORRECT_EMAIL="NEW AUTHOR EMAIL" +if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] +then + export GIT_COMMITTER_NAME="$CORRECT_NAME" + export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" +fi +if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] +then + export GIT_AUTHOR_NAME="$CORRECT_NAME" + export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL" +fi +' --tag-name-filter cat -- --branches --tags