]> 91.132.146.200 Git - klimbim.git/commitdiff
git stuff.
authorBanana <banana@starscream.de>
Wed, 11 Nov 2015 11:03:01 +0000 (12:03 +0100)
committerBanana <banana@starscream.de>
Wed, 11 Nov 2015 11:03:01 +0000 (12:03 +0100)
rewrite git author

git/README [new file with mode: 0644]
git/git-rewrite-author.sh [new file with mode: 0755]

diff --git a/git/README b/git/README
new file mode 100644 (file)
index 0000000..3d38c84
--- /dev/null
@@ -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 (executable)
index 0000000..aef33cc
--- /dev/null
@@ -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