gitコミットログのユーザーやタイムスタンプを修正
git commit --amend \ --date="Sat Jun 10 13:00:32 2014 +0900" \ --author="author <author@example.com>"
で、コミットしたユーザー(author)とその日時(author date)を修正できる。デフォルトのgit log
で表示されるものが、これらである。
一方で、authorとauthor dateとは別に、committerとcommit dateがある。これらは、コミットをrebaseしたユーザーとその日時をトラックするために使われる。committerとcommit dateも修正するためには、以下のようにする:
GIT_COMMITTER_NAME="committer" \ GIT_COMMITTER_EMAIL="committer@example.com" \ GIT_COMMITTER_DATE="Sat Jun 10 13:05:32 2014 +0900" \ git commit --amend \ --date="Sat Jun 10 13:00:32 2014 +0900" \ --author="author <author@example.com>"
committerとcommit dateを確認するには、git log
にオプションを与える:
git log --pretty=fuller