[小记]shell获取git最近一次提交信息

news/发布时间2024/5/16 9:14:56

‘%H’: commit hash

‘%h’: abbreviated commit hash

‘%T’: tree hash

‘%t’: abbreviated tree hash

‘%P’: parent hashes

‘%p’: abbreviated parent hashes

‘%an’: author name

‘%aN’: author name (respecting .mailmap, see git-shortlog[1] or git-blame[1])

‘%ae’: author email

‘%aE’: author email (respecting .mailmap, see git-shortlog[1] or git-blame[1])

‘%ad’: author date (format respects --date= option)

‘%aD’: author date, RFC2822 style

‘%ar’: author date, relative

‘%at’: author date, UNIX timestamp

‘%ai’: author date, ISO 8601-like format

‘%aI’: author date, strict ISO 8601 format

‘%cn’: committer name

‘%cN’: committer name (respecting .mailmap, see git-shortlog[1] or git-blame[1])

‘%ce’: committer email

‘%cE’: committer email (respecting .mailmap, see git-shortlog[1] or git-blame[1])

‘%cd’: committer date (format respects --date= option)

‘%cD’: committer date, RFC2822 style

‘%cr’: committer date, relative

‘%ct’: committer date, UNIX timestamp

‘%ci’: committer date, ISO 8601-like format

‘%cI’: committer date, strict ISO 8601 format

‘%d’: ref names, like the --decorate option of git-log[1]

‘%D’: ref names without the " (", “)” wrapping.

‘%S’: ref name given on the command line by which the commit was reached (like git log --source), only works with git log

‘%e’: encoding

‘%s’: subject

‘%f’: sanitized subject line, suitable for a filename

‘%b’: body

‘%B’: raw body (unwrapped subject and body)

‘%N’: commit notes

‘%GG’: raw verification message from GPG for a signed commit

‘%G?’: show “G” for a good (valid) signature, “B” for a bad signature, “U” for a good signature with unknown validity, “X” for a good signature that has expired, “Y” for a good signature made by an expired key, “R” for a good signature made by a revoked key, “E” if the signature cannot be checked (e.g. missing key) and “N” for no signature

‘%GS’: show the name of the signer for a signed commit

‘%GK’: show the key used to sign a signed commit

‘%GF’: show the fingerprint of the key used to sign a signed commit

‘%GP’: show the fingerprint of the primary key whose subkey was used to sign a signed commit

‘%gD’: reflog selector, e.g., refs/stash@{1} or refs/stash@{2 minutes ago}; the format follows the rules described for the -g option. The portion before the @ is the refname as given on the command line (so git log -g refs/heads/master would yield refs/heads/master@{0}).

‘%gd’: shortened reflog selector; same as %gD, but the refname portion is shortened for human readability (so refs/heads/master becomes just master).

‘%gn’: reflog identity name

‘%gN’: reflog identity name (respecting .mailmap, see git-shortlog[1] or git-blame[1])

‘%ge’: reflog identity email

‘%gE’: reflog identity email (respecting .mailmap, see git-shortlog[1] or git-blame[1])

‘%gs’: reflog subject

‘%Cred’: switch color to red

‘%Cgreen’: switch color to green

‘%Cblue’: switch color to blue

‘%Creset’: reset color

‘%C(…​)’: color specification, as described under Values in the “CONFIGURATION FILE” section of git-config[1]. By default, colors are shown only when enabled for log output (by color.diff, color.ui, or --color, and respecting the auto settings of the former if we are going to a terminal). %C(auto,…​) is accepted as a historical synonym for the default (e.g.,%C(auto,red)). Specifying %C(always,…​) will show the colors even when color is not otherwise enabled (though consider just using --color=always to enable color for the whole output, including this format and anything else git might color). auto alone (i.e. %C(auto)) will turn on auto coloring on the next placeholders until the color is switched again.

‘%m’: left () or boundary (-) mark

‘%n’: newline

‘%%’: a raw ‘%’

‘%x00’: print a byte from a hex code

‘%w([[,[,]]])’: switch line wrapping, like the -w option of git-shortlog[1].

‘%[,trunc|ltrunc|mtrunc])’: make the next placeholder take at least N columns, padding spaces on the right if necessary. Optionally truncate at the beginning (ltrunc), the middle (mtrunc) or the end (trunc) if the output is longer than N columns. Note that truncating only works correctly with N >= 2.

‘%)’: make the next placeholder take at least until Nth columns, padding spaces on the right if necessary

‘%>()’, ‘%>|()’: similar to ‘%)’, ‘%)’ respectively, but padding spaces on the left

‘%>>()’, ‘%>>|()’: similar to ‘%>()’, ‘%>|()’ respectively, except that if the next placeholder takes more spaces than given and there are spaces on its left, use those spaces

‘%>)’, ‘%>)’: similar to ‘%)’, ‘%)’ respectively, but padding both sides (i.e. the text is centered)

%(trailers[:options]): display the trailers of the body as interpreted by git-interpret-trailers[1]. The trailers string may be followed by a colon and zero or more comma-separated options. If the only option is given, omit non-trailer lines from the trailer block. If the unfold option is given, behave as if interpret-trailer’s --unfold option was given. E.g., %(trailers:only,unfold) to do both.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.bcls.cn/puZE/1592.shtml

如若内容造成侵权/违法违规/事实不符,请联系编程老四网进行投诉反馈email:xxxxxxxx@qq.com,一经查实,立即删除!

相关文章

虹科方案 | 释放总线潜力:汽车总线离线模拟解决方案

来源:虹科汽车智能互联 虹科方案 | 释放总线潜力:汽车总线离线模拟解决方案 原文链接:https://mp.weixin.qq.com/s/KGv2ZOuQMLIXlOiivvY6aQ 欢迎关注虹科,为您提供最新资讯! #汽车总线 #ECU #汽车网关 导读 传统的…

ASP.NET-实现图形验证码

ASP.NET 实现图形验证码能够增强网站安全性,防止机器人攻击。通过生成随机验证码并将其绘制成图像,用户在输入验证码时增加了人机交互的难度。本文介绍了如何使用 C# 和 ASP.NET 创建一个简单而有效的图形验证码系统,包括生成随机验证码、绘制…

javaweb学习day03(JS+DOM)

一、javascript入门 1 官方文档 地址: https://www.w3school.com.cn/js/index.asp离线文档: W3School 离线手册(2017.03.11 版).chm 2 基本说明 JavaScript 能改变 HTML 内容,能改变 HTML 属性,能改变 HTML 样式 (CSS),能完成 页面的数据…

“成像光谱遥感技术中的AI革命:ChatGPT应用指南“

遥感技术主要通过卫星和飞机从远处观察和测量我们的环境,是理解和监测地球物理、化学和生物系统的基石。ChatGPT是由OpenAI开发的最先进的语言模型,在理解和生成人类语言方面表现出了非凡的能力。本课程重点介绍ChatGPT在遥感中的应用,人工智…

[OPEN SQL] 删除数据

DELETE语句用于删除数据库表中的数据 本次操作使用的数据库表为SCUSTOM&#xff0c;其字段内容如下所示 航班用户(SCUSTOM) 需要删除以下数据 1.删除单条数据 语法格式 DELETE <dbtab> FROM <wa>. DELETE <dbtab> FROM TABLE <itab>. DELETE FROM &…

Apipost推出的IDEA插件值得一试!

Apipost-Helper是由Apipost推出的IDEA插件&#xff0c;写完接口可以进行快速调试&#xff0c;且支持搜索接口、根据method跳转接口&#xff0c;还支持生成标准的API文档&#xff0c;注意&#xff1a;这些操作都可以在代码编辑器内独立完成&#xff0c;非常好用&#xff01;这里…

jmeter 命令行启动 动态参数化

[Jmeter命令行参数] 一、在linux中&#xff0c;使用非gui的方式执行jmeter。若需更改参数&#xff0c;必须先编辑jmx文件&#xff0c;找到对应的变量进行修改&#xff0c;比较麻烦。因此&#xff0c;可以参数化一些常用的变量&#xff0c;直接在Jmeter命令行进行设置 二、参数…

数字化转型导师坚鹏:政府数字化转型之数字化技术

政府数字化转型之数字化技术 ——物联网、云计算、大数据、人工智能、虚拟现实、区块链、数字孪生、元宇宙等综合解析及应用 课程背景&#xff1a; 数字化背景下&#xff0c;很多政府存在以下问题&#xff1a; 不清楚新技术的发展现状&#xff1f; 不清楚新技术的重要应…

压制es-hadoop这头野兽的方式来了~

背景 每天elasticsearch集群在上午某个时间段CPU几乎打满&#xff0c;此时访问elasticsearch的服务rt会跟着抖动&#xff0c;通过排查发现是由于这个时间段会有数据通过hive任务写到elasticsearch&#xff0c;这个hive任务使用的是ES-Hadoop插件做的数据导入&#xff0c;整个问…

C# redis 菜鸟级别 订阅与频道,发送消息

// 建立 Redis 连接 发送部分代码 using StackExchange.Redis; ConnectionMultiplexer redis ConnectionMultiplexer.Connect("127.0.0.1:6379,password123456"); // 获取发布者 ISubscriber publisher redis.GetSubscriber(); // 发布消息到指定频道 string c…

我的音乐伙伴:南卡、韶音、墨觉三款热门骨传导耳机体验分享

作为一个热爱运动的音乐爱好者。对我来说&#xff0c;没有什么能比在运动时配上心爱的歌曲更让人兴奋的了。不管是清晨的跑步&#xff0c;还是傍晚的散步&#xff0c;音乐总能激发我更多的能量。但是&#xff0c;找到既能陪伴我完成高强度训练&#xff0c;又不失音质的耳机&…

C++文件操作

文件操作 程序运行时产生的数据都属于临时数据&#xff0c;程序一旦运行结束都会被释放 通过文件可以将数据持久化 C中对文件操作需要包含头文件 < fstream > 文件类型分为两种&#xff1a; 文本文件 - 文件以文本的ASCII码形式存储在计算机中二进制文件 - 文件以文…

版本控制(Git)

Fork 本课程网站的仓库 将版本历史可视化并进行探索是谁最后修改了 README.md文件&#xff1f;&#xff08;提示&#xff1a;使用 git log 命令并添加合适的参数&#xff09;最后一次修改_config.yml 文件中 collections: 行时的提交信息是什么&#xff1f;&#xff08;提示&am…

探索 LRU 算法的缺陷与解决方案

LRU算法 Linux 的 Page Cache 和 MySQL 的 Buffer Pool 的大小是有限的&#xff0c;并不能无限的缓存数据&#xff0c;对于一些频繁访问的数据我们希望可以一直留在内存中&#xff0c;而一些很少访问的数据希望可以在某些时机可以淘汰掉&#xff0c;从而保证内存不会因为满了而…

逻辑回归为什么使用交叉熵而不用均方差?

逻辑回归为什么使用交叉熵而不用均方差&#xff1f;或者说逻辑回归的损失函数为什么不用最小二乘&#xff1f; 下面主要从两个角度进行阐述&#xff1a; 从逻辑回归的角度出发&#xff0c;逻辑回归的预测值是一个概率&#xff0c;而交叉熵又表示真实概率分布与预测概率分布的…

数据结构(4) 链表(链式存储)

链表&#xff08;链式存储&#xff09; 单链表定义基本操作的实现单链表的插入按位序插入指定节点的前插指定节点的后插 单链表的删除 小结 单链表 定义 顺序表优点:可随机存取&#xff0c;存储密度高&#xff0c;缺点:要求大片连续空间&#xff0c;改变容量不方便。 单链表优…

C++:C++入门基础

创作不易&#xff0c;感谢三连 &#xff01;&#xff01; 一、什么是C C语言是结构化和模块化的语言&#xff0c;适合处理较小规模的程序。对于复杂的问题&#xff0c;规模较大的程序&#xff0c;需要高度的抽象和建模时&#xff0c;C语言则不合适。为了解决软件危机&#xff…

云服务器ECS价格表出炉——阿里云

2024年阿里云服务器租用价格表更新&#xff0c;云服务器ECS经济型e实例2核2G、3M固定带宽99元一年、ECS u1实例2核4G、5M固定带宽、80G ESSD Entry盘优惠价格199元一年&#xff0c;轻量应用服务器2核2G3M带宽轻量服务器一年61元、2核4G4M带宽轻量服务器一年165元12个月、2核4G服…

内网安全-内网穿透

目录 内网渗透 Nc使用详解 Nc监听和探测 Nc传文件 termite内网穿透工具 ssh代理内网穿透 ssh配置socket代理 MSF多级网络穿透 内网渗透 Nc使用详解 Nc监听和探测 Nc传文件 termite内网穿透工具 1、termite 之前叫ew &#xff08;可以进行正向连接&#xff0c;可以…

【git 使用】使用 git rebase -i 修改任意的提交信息/合并多个提交

修改最近一次的提交信息的方法有很多&#xff0c;可以参考这篇文章&#xff0c;但是对于之前的提交信息进行修改只能使用 rebase。 修改提交信息 假设我们想修改下面这个提交信息&#xff0c;想把【登录】改成【退出登录】步骤如下 运行 git rebase -i head~3 打开了一个文本…
推荐文章