DEV Community

Discussion on: Refresh commit date

Collapse
 
jessekphillips profile image
Jesse Phillips

Could I get more reason why I'd want to rewrite chronological order?

Collapse
 
konstantin profile image
Konstantin • Edited

You don’t rewrite the chronological order. You rewrite timestamps but you keep the chronological order.

Collapse
 
jessekphillips profile image
Jesse Phillips

Chronological is in the order in which events happened (it is in relation to time). The original time stamp is the chronological order.

Why would I want to change the time stamp?

Thread Thread
 
konstantin profile image
Konstantin

Like you said, the chronological order is an order of events relative to timescale, so if you change the initial time stamp, but the order stays the same but relative to a new timestamp, it doesn’t mean that you’ve changed the chronological order, you just switched the initial timestamp. The order is the same.

That being said, if you decided to take a sample of commits before recent commit/commits, and switched initial timestamp of the first commit of that sample so it comes after every commit, you would effectively change the chronological order, that is to say the sample would chronologically be after the latest commit/commits

Regarding the question «why?», I see several use cases, but my main intent of this exercise was to try to find a way to make part of your work seem to have been done at a later time then it was done initially, for instance if you sketched some code in the morning and wanted to be able to push it as if it was done in the evening.

Thread Thread
 
jessekphillips profile image
Jesse Phillips

OK, I guess I was thinking about reordered Commits can happen.

Still not sure why the morning Commits would be desired to be changed for the evening.

Collapse
 
lucaskunzler profile image
Lucas Kunzler

And why would I want to do that?

Thread Thread
 
puritanic profile image
Darkø Tasevski

Probably to keep GitHub activity streak or something. Those sweet internet points 🙂