Skip to content

Instantly share code, notes, and snippets.

var a = 2
var b = 4
func add(x, y) {
return x + y
}
@saru2020
saru2020 / git-author-rewrite.sh
Created June 3, 2017 16:14
Used to change the Author's (Name & Email) in all the commits in Git History.
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"

Videos