git merge是否考虑合并文件上的时间戳? [英] Does git merge take into account timestamps on merged files?

查看:147
本文介绍了git merge是否考虑合并文件上的时间戳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

合并两个文件时,git是否考虑到哪个文件较新而哪个文件较旧?如果是,时区会发生什么,如果一个用户使用的文件较旧,但时区却使它看起来较新,该怎么办?

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 their timezone makes it look newer?

推荐答案

所以时区增量可能是提交时间戳的问题

so can the timezone delta be a problem with commit timestamps

否:只有提交图很重要,无论它们的关联日期是什么.
理论上,一个提交可以在该提交的之后中(而不是之前)创建一个父提交:日期是创建时与该提交相关联的任意元数据,例如作者字符串. (例如,请参见 GIT_AUTHOR_DATEGIT_COMMITER_DATE环境变量)

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)

最近(2018年第二季度) Git提交图形设计说明)

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

查看更多有关"按时间顺序"排序:时间是一种错觉;记录时间,是双倍的".

这篇关于git merge是否考虑合并文件上的时间戳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆