美文网首页
什么是tree-ish表达式

什么是tree-ish表达式

作者: cdz620 | 来源:发表于2020-03-02 14:21 被阅读0次

定义

一种可以定位到某次提交的表达式,主要有以下几种表达方式

全哈希或者半哈希表示

  • git show a5bec062afe1348b8317651c93cf5049e6b4e55e

  • git show a5bec062

引用(在.git/refs文件夹中可以找到, 在.git下也有些文件:HEAD)

  • git show HEAD

  • git show master

字符 ^

  • git show HEAD^ 前一次提交

  • git show a5bec062 ^^ 前两次提交

符号 ~

  • git show HEAD~3 之前的三次提交

序号 @

  • git show master@{0} 前一次提交

  • git show master@{yesterday} 一天前

  • git show master@{1.hour.ago} 一小时前

相关文章

网友评论

      本文标题:什么是tree-ish表达式

      本文链接:https://www.haomeiwen.com/subject/petkchtx.html