Skip to content

jaeyeopme/author-modifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Author Modifier

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.

Features

  • Change specific author names and emails
  • Change all author names and emails
  • Operate on specific branches or all branches
  • Execute in a specified directory

Usage

Prerequisites

  • Unix-like system (Linux, macOS) or Windows (can be run using WSL)

  • Git must be installed

  • git-filter-repo must be installed. You can install it using:

    pip install git-filter-repo

    Or follow the installation instructions at: https://github.com/newren/git-filter-repo

How to Run

1. Download the author-modifier.sh script

curl -O https://raw.githubusercontent.com/jaeyeopme/author-modifier/main/author-modifier.sh

2. Open the command line and navigate to the directory where the script is located

3. Run the following command to execute the script

./author-modifier.sh --old-name="old_name" --old-email="[email protected]" --new-name="new_name" --new-email="[email protected]" --branch="branch_name" [path_to_repository]

4. Options

  • --new-name - New author name to set. Required if --new-email is not provided.
  • --new-email - New author email to set. Required if --new-name is not provided.
  • --old-name - Old author name to replace. Default: '*' (matches all names).
  • --old-email - Old author email to replace. Default: '*' (matches all emails).
  • --branch - Git branch to modify. Default: '*' (processes all branches).
  • [path_to_repository] - Path to the Git repository. Default: current directory.

5. Push changes to the remote repository (if needed)

git push --set-upstream origin branch_name --force

Example

  • Change all author names and emails in all branches of the specified repository:
./author-modifier.sh --new-name="new_name" --new-email="[email protected]" /path/to/repository
  • Change specific author name and email in a specific branch:
./author-modifier.sh --new-name="new_name" --new-email="[email protected]" --old-name="old_name" --old-email="[email protected]" --branch="branch_name" /path/to/repository

About

A tool to batch change the author name and email of your Git commits.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages