Created
April 16, 2020 09:57
-
-
Save anil-kk/44288a6d02e297250a39808744a173cf to your computer and use it in GitHub Desktop.
Rename git commits author details to a repo
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
git clone --bare https://github.com/user/repo.git | |
cd repo.git | |
_____________________________ | |
copy the below commmands to help.sh file and make it executable by running this command | |
chmod +x help.sh | |
./help.sh | |
________________________________________________________________________ | |
#!/bin/sh | |
git filter-branch --commit-filter ' | |
if [ "$GIT_COMMITTER_NAME" = "SomeWrongName" ]; | |
then | |
GIT_COMMITTER_NAME="Anil Kumar Kothapalli"; | |
GIT_AUTHOR_NAME="Anil Kumar Kothapalli"; | |
GIT_COMMITTER_EMAIL="[email protected]"; | |
GIT_AUTHOR_EMAIL="[email protected]"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; | |
fi' HEAD | |
___________________________________________________________________ | |
git push --force --tags origin HEAD:master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment