Hi Buddhi Nipun Mihara,

On Thursday, July 20, 2017 at 7:55:08 AM UTC+2, Buddhi Nipun Mihara wrote:
>
> I am working on a project which maintains our code base in GitHub. 
> We have faced following issue
> One of our developer changed his local machine date and time. after that, 
> he committed his changes to his fork and then his changes were merged to 
> master branch. 
> After that, I have got a pull request and then did some changes and 
> committed my changes to my fork. 
> but in my fork, my committed are shown below the above-mentioned commit. 
> which has data and time set to August 2017. But I did my changes in July 
> 2017.
>

You described your current situation well, but you didn`t ask any 
questions...? What would you want to do?

No matter the commit date/time, Git won`t get confused about commit order 
in terms of which commit (snapshot, code state) follows the other, and 
commit date/time has no influence there - commit parentage does, where 
parent commits always come before commits they`re parents of.

If commits on different branches have different timestamps, then date/time 
will influence the order in which they`re shown between each other, but 
that doesn`t mean anything other than the obvious, that later commits are 
commited after the former ones - at least as far as their timestamp is 
concerned :)

Also, once your colleague`s commits got merged, if the machine where the 
merge was performed had correct date/time settings, the merge commit 
timestamp should be correct as well, no matter that it actually comes after 
your colleague`s commits with timestamps in the future...

And note that each commit has both "auhor date" and "commit date", though I 
don`t know if that`s relevant for your workflow.

Regards,
Buga

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to