git branch | grep -v "main" | xargs git branch -D
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
#!/bin/sh | |
# Replace/modify committer name & email of all Git historical commits | |
# git-replace-committer-email.sh v1 git@tanshuai.com | |
# Usage: | |
# cd <git repo> | |
# sh ../git-replace-committer-email.sh | |
# git push --force --tags origin HEAD:main | |
git filter-branch -f --env-filter ' |
git for-each-ref --format='%(committerdate) %09 %(authorname) %(authoremail) %09 %(refname)' --sort=committerdate