Skip to content

Instantly share code, notes, and snippets.

@hymkor
Created June 13, 2026 16:06
Show Gist options
  • Select an option

  • Save hymkor/0751593a22c31e37e2e2cb8089610ff8 to your computer and use it in GitHub Desktop.

Select an option

Save hymkor/0751593a22c31e37e2e2cb8089610ff8 to your computer and use it in GitHub Desktop.
git の履歴を任意の日時で作る

コミット方法

export GIT_AUTHOR_DATE="2023-04-01T12:00:00"
export GIT_COMMITTER_DATE="2023-04-01T12:00:00"
git commit -m "Commit with a custom timestamp"

確認方法

git log --format=fuller

注意

  • GitHub で見る時、この日時順で表示されるので、一番最初のダミーコミットが現在時刻だと、おかしな順で表示されてしまう。最初のコミットは訂正が難しいので、要注意

How to tweak Git commit timestamps (author and committer dates) - Sling Academy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment