- clone your repository with
baretag
git clone --bare https://github.com/yournickname/reponame.git
- go to your repository
cd reponame.git
-
download script that i put here -> 'replace-git-commit-author.sh'
-
move into your repository.git
-
edit script to your: email that you wanna change, email and name that will be to changed instead.
OLD_EMAIL=""
CORRECT_NAME=""
CORRECT_EMAIL=""
- run script (to run bash scripts you need: git bash or WSL)
./replace-git-commit-author.sh
- push only tags i guess
git push --force --tags origin 'refs/heads/*'
!! and if u have multiple old emails to check, then u can use script: replace-all-manually.sh to write them down, if don't work try then replace-all-manually-2.sh, for me its working so yeah should be alright.
to check who is author in commits = git log --oneline --format="%h %an <%ae>" -10
the easiest way - just use replace-all.sh to change all commits to your needed author, always work, but if you work with someone you will change their author to yours.... i guess, so becareful to what shell script to use