Skip to content

Instantly share code, notes, and snippets.

View thiagoszbarros's full-sized avatar
🎯
Focusing

Thiago Barros thiagoszbarros

🎯
Focusing
View GitHub Profile
@thiagoszbarros
thiagoszbarros / gist:f87d44e68981010bc3fa116bce72f70b
Created February 7, 2024 11:48
script para alterar email do autor dos commits git
#!/bin/bash
OLD_EMAIL="[email protected]"
NEW_EMAIL="[email protected]"
# Verify that the old email exists in the commit history
if git log --all --grep="$OLD_EMAIL" --author="$OLD_EMAIL" --oneline --quiet; then
# Rewrite the Git history
git filter-branch --env-filter "
if [ \"\$GIT_AUTHOR_EMAIL\" = \"$OLD_EMAIL\" ]; then