Last active
March 16, 2024 06:10
-
-
Save aptitudepi/e783b5015b7124ba21307742585469cd to your computer and use it in GitHub Desktop.
Use gh cli and git to rewrite commit history and anonymize commits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip3 install git-filter-repo | |
gh repo list --json name -q '.[].name' --limit 1000 | while read -r repo; do ─╯ | |
gh repo clone "$repo" | |
cd "$repo" | |
git-filter-repo --email-callback 'return email.replace(b"old@email.com", b"new@email.com")' | |
git push | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment