Skip to content

Instantly share code, notes, and snippets.

@esabook
Created February 16, 2023 13:53
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 esabook/ae4f22caf402038f60baffea6795aa86 to your computer and use it in GitHub Desktop.
Save esabook/ae4f22caf402038f60baffea6795aa86 to your computer and use it in GitHub Desktop.
1. Open bash
2. goto root project
3. git config --global alias.change-commits '!'"f() { VAR=\$1; OLD=\$2; NEW=\$3; shift 3; git filter-branch --env-filter \"if [[ \\\"\$\`echo \$VAR\`\\\" = '\$OLD' ]]; then export \$VAR='\$NEW'; fi\" \$@; }; f"
4. git change-commits GIT_AUTHOR_EMAIL "egit.saputra@bareksa.com" "esa_book@outlook.com" HEAD~50..HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment