LoginSignup
1
0

More than 3 years have passed since last update.

gitでコミット時間を変更する

Last updated at Posted at 2019-11-25

コミット時間を変更したいことって意外とけっこうありますよね。

やりかた

HEAD~数字のところは変えたいコミットの数を入力してください。

$ git rebase -i HEAD~数字
pick を edit に変更

以下を実行するとCommitDate と AuthorDateの両方が現在時刻に変更されます。

$ git commit --amend --date=now
$ git rebase --continue

以上です。

1
0
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
0