Git squash - change time of last commit to current time

1 points
Created by:

Quick solution:

git commit --amend --date="now"

If we squashed 3 commits into 1, sometimes we end up with commit time from 2 days ago and we want this 1 commit to have current time. Above command do the work.

Alternative titles

  1. git modify commit time to current time
  2. git update commit time to current time
  3. git update time of commit
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Git - rebase & squash

Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂