LoginSignup
1
2

More than 5 years have passed since last update.

gitで直前コミットのAuthorの上書き

Posted at

gitのアカウントを複数運用していると、度々コミットのユーザーを間違えることがあるのでメモ書き。
下記コマンドで直前のコミットを上書きできる。

git commit --amend --author="blue_goheimochi <blue_goheimochi@hogehoge.com>"

忘れないようにちゃんとローカルに設定しておこう。

git config --local user.name blue_goheimochi
git config --local user.email blue_goheimochi@hogehoge.com
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2