Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nkrumahthis/git-commit-email-changer
shell script for updating email addresses in Git commit history
https://github.com/nkrumahthis/git-commit-email-changer
Last synced: about 2 months ago
JSON representation
shell script for updating email addresses in Git commit history
- Host: GitHub
- URL: https://github.com/nkrumahthis/git-commit-email-changer
- Owner: nkrumahthis
- Created: 2023-07-16T11:26:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-16T11:37:26.000Z (over 1 year ago)
- Last Synced: 2024-04-23T19:14:17.249Z (9 months ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: change_email.sh
Awesome Lists containing this project
README
# Git Email Change Script
Easily migrate and update email addresses associated with previous commits.
This repository contains a shell script that changes the email addresses in the commit history of a Git repository. The script allows you to update both the user and author email addresses.
## create a back up
Open a terminal or command prompt and navigate to the repository directory where you want to change the author email.
Create a backup of your repository in case something goes wrong:
```bash
git clone --mirror backup_repo
```Change into the cloned backup repository directory:
```bash
cd backup_repo
```## usage
1. Save the above script in a file (e.g., `change_email.sh`)
2. make it executable (`chmod +x change_email.sh`)
3. and run it from the command line with the old and new email parameters:```bash
./change_email.sh [email protected] [email protected]
```Make sure you run this script in the root directory of the git repository where you want to change the email addresses in the commit history.
The script updates the local Git configuration and changes all commits with the old email address to the new email address.
## Caveat / Warning
Please note that running git filter-branch can have significant consequences, so it's important to have a backup of your repository before proceeding.
Ensure you understand the implications and consult the README for detailed usage instructions and any additional considerations.
## Contributions and Feedback
Contributions and feedback are welcome! Feel free to fork the repository and submit pull requests with improvements or suggestions.