Gitのコミットを修正する
たまにGitのコミットユーザー名とメールアドレスの設定をし忘れてて、本意と別の設定でコミットしてしまうことがある。
そんなときにコミットユーザーとAuthorを変更する方法をメモしておく。
https://qiita.com/sea_mountain/items/d70216a5bc16a88ed932
code:shell
# Committer変更
git config --local user.name "変更したい名前"
git config --local user.email wanttochangeaddress@example.com
git commit --amend
# Author変更
git commit --amend --author="変更したい名前 <wanttochangeaddress@example.com>"
# 確認方法
git log -1 --pretty=full