Does git merge take into account timestamps on merged files?

后端 未结 1 1808
耶瑟儿~
耶瑟儿~ 2021-01-14 07:15

When merging two files, does git take into account which file is newer and which one is older? If yes, what happens with timezones, what if one user has an older file but th

1条回答
  •  野的像风
    2021-01-14 08:00

    so can the timezone delta be a problem with commit timestamps

    No: only the graph of commit matters, whatever their associated date is.
    A commit can in theory have a parent commit created after said commit (instead of before): the date is an arbitrary metadata you associate to a commit when you create it, like the author string. (see for instance the GIT_AUTHOR_DATE and GIT_COMMITER_DATE environment variables)

    The recent (Q2 2018) commit-graph feature from Microsoft does not depend on dates at all, for instance. (see Git Commit Graph Design Notes)

    See more with "“Chronological” ordering: time is an illusion; log time, doubly so".

    0 讨论(0)
提交回复
热议问题