author-modifier.sh
is a shell script that allows you to batch change the author name and email of commits in a Git repository. This script can operate on specific branches or all branches and can change specific author information or all author information.
- Change specific author names and emails
- Change all author names and emails
- Operate on specific branches or all branches
- Execute in a specified directory
- Unix-like system (Linux, macOS) or Windows (can be run using WSL)
- Git must be installed
git-filter-repo
must be installed.
curl -O https://github.com/jaeyeopme/author-modifier/main/author-modifier.sh
./author-modifier.sh --old-name="old_name" --old-email="old_email@example.com" --new-name="new_name" --new-email="new_email@example.com" --branch="branch_name" [path_to_repository]
--new-name
is the new author name.--new-email
is the new author email.--old-name
is the current author name. If not specified, all names will be changed.--old-email
is the current author email. If not specified, all emails will be changed.--branch
is the branch to be changed. If not specified, all branches will be changed.[path_to_repository]
is the path to the repository. If not specified, the current directory will be used.
git push --set-upstream origin "branch_name --force
- Change all author names and emails in all branches of the specified repository:
./author-modifier.sh --new-name="new_name" --new-email="new_email@example.com" /path/to/repository
- Change specific author name and email in a specific branch:
./author-modifier.sh --new-name="new_name" --new-email="new_email@example.com" --old-name="old_name" --old-email="old_email@example.com" --branch="branch_name" /path/to/repository