Reputation: 296
I was trying to push some changes to a forked copy of a repo. At the time of the commit my system date was wrong and ahead of one day. Now after the upstream repo merged my changes, my commit time stamp is ahead of the actual merging time stamp. How can this be corrected?
Why there is no check from remote while committing?
Upvotes: 0
Views: 1959
Reputation: 1324347
You can change the timestamp of an old commit (I have a script for that) but that would also change the history of the repo, forcing you to use a git push --force
.
Make sure all other collaborators are aware of that change.
Why there is no check from remote while committing ?
Because (in a "distributed" environment) there is no central "time" source to refer to: both the downstream and upstream (remote) repos could have their internal clock skewed, so no check is really possible.
Upvotes: 3