Git中的时间戳 [英] Timestamps in Git

查看:330
本文介绍了Git中的时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

  1. 当我向分支机构提交修订版本时,会记录其提交时间戳记",如果是,则使用该时间戳记以及用于什么目的吗?在我看来,提交链/树将是您所需要的.

  1. When I commit a revision to a branch is their a "commit timestamp" recorded and if so is it ever used and for what? It seems to me like the commit chains/trees would be all you need.

如果有记录它的提交时间戳",则是客户端(委员会)还是服务器(主存储库)?

If there is a "commit timestamps" who records it, the client (committee) or server (main repository)?

合并两个分支时,合并时要考虑什么?合并基本上遵循什么规则?它是否以更少的提交写入文件?是否使用时间戳来确定哪个较新?

When I merge two branches, what is taken into consideration when doing the merge? Basically what rules does the merge play by? Does it write the files with less commits under it? Does it use timestamps to determine which is newer?

预先感谢,寻找答案或好的资源.

Thanks in advance, looking for answers or good resources.

推荐答案

  1. 是的,当您查看日志时,将看到进行提交的时间.示例:

  1. Yes, you will see the time the commit was made when you look at the log. Example:

$ git log -1
commit 4f0ba140d3a9709825c4d6b77ca5b69d09825c41
Author: Somebody <someone@somewhere>
Date:   Tue Jan 24 16:36:55 2012 -0800

    Commit message goes here

  • Git是分布式的,没有客户端或服务器.

  • Git is distributed, there are no clients or servers.

    这取决于您希望合并如何工作. 文档将为您描述所有可能的选择.基本合并情况仅占用自共同祖先以来的所有提交.

    It depends on how you want the merge to work. The documentation will describe all of the possible options for you. The basic merge case just takes all of the commits since the common ancestor.

    这篇关于Git中的时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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