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

‘%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.mfbz.cn/a/399917.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

怿星科技测试实验室(EPT LABS)服务介绍

据中国汽车工业协会数据,2023年我国汽车产销量分别达3016.1万辆和3009.4万辆,年产销量双双创历史新高,汽车行业进入了新时代。新汽车时代下的OEM竞争更激烈,汽车电子架构更复杂,研发周期更短,软件迭代更快&…

汽车线束中的螺栓拧紧有哪些要求——SunTorque智能扭矩系统

在现代汽车的电气系统中,线束是连接各个电器元件的桥梁,承担着传输电能、信号以及实现控制功能的重要任务。而在线束的装配过程中,螺栓的拧紧技术是确保线束固定、连接可靠的关键环节。SunTorque智能扭矩系统和大家一起探讨汽车线束中的螺栓拧…

Java中的关键字

✨✨ 所属专栏: Java基石:深入探索Java核心基础✨✨ 🎈🎈作者主页: 喔的嘛呀🎈🎈 Java中的关键字是一些具有特殊含义的单词,它们在语法中有特定的用途,不能用作标识符&am…

响应式编程上下文

标题响应式编程代码示例 代码示例 多个消费者订阅了同一个生产者 package com.yaeher.infrastructure.userinfovault.user; import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import reactor.core.scheduler.Scheduler; import reactor.core.schedul…

基于ImageSharp实现趣味横生的点选验证

引言 随着安全需求的不断提升,传统的文本验证码已经无法满足防止机器自动识别和攻击的要求。点选式验证码作为一种交互式的验证手段,因其更难被自动化脚本破解而逐渐受到欢迎。利用开源图像处理库SixLabors.ImageSharp来实现点选式验证码功能。 ImageS…

APP 有漏洞被测要下架,怎么处理?

事情的经过是这样的: 1:学员公司测试的 APP 发现有漏洞,被要求下架 2:他被公司要求去查询 APP 哪里有漏洞 3:他来寻求帮助,推荐几款安全测试扫描漏洞的问题。 事情的梳理: 1:我们看了他的 …

UE5 C++ UENUM 和 USTRUCT

一.首先在APawn里声明 UENUM 和 USTRUCT。UENUM 有两种定义方式 一种是使用命名空间: 还有是继承uint8: 通过申明class类 别名来替代 USTRUCT的定义 上面的第二种有类似但仍然有很多的差异: 首先要有GENERATED_USTRUCT_BODY()这个函数 并且…

fastApi笔记04-查询参数和字符串校验

额外校验 使用Query可以对查询参数添加校验 from typing import Unionfrom fastapi import FastAPI, Queryapp FastAPI()app.get("/items/") async def read_items(q: Union[str, None] Query(defaultNone, max_length50)):results {"items": [{"…

春招面试准备笔记——过拟合和欠拟合

介绍 过拟合:过拟合是指模型在训练过程中过于复杂,拥有过多的参数,以至于在训练数据集上表现良好,但在未见过的测试数据上表现很差的现象。这种情况下,模型可能只是“死记硬背”了训练数据的特征和噪声,而…

SpringBoot中使用PageHelper插件实现Mybatis分页

场景 SpringBoot中整合Mybatis时一般添加的依赖为 <dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>2.2.1</version></dependency> 如果要实现分页查…

解锁ThreadLocal的问题集:如何规避多线程中的坑

欢迎来到我的博客&#xff0c;代码的世界里&#xff0c;每一行都是一个故事 解锁ThreadLocal的问题集&#xff1a;如何规避多线程中的坑 前言内存泄露问题内存泄漏原因&#xff1a;检测和避免内存泄漏的实用建议&#xff1a; 线程池带来的数据混乱最佳实践&#xff1a;注意事项…

CVE-2024-0918 TEW-800MB RCE漏洞分析

漏洞描述 固件版本为1.0.1.0的TEW-800MB路由器存在命令注入漏洞。如果攻击者获得了web管理权限&#xff0c;他们可以将命令注入到httpd未知函数中的post请求参数DeviceURL中&#xff0c;从而获得shell权限。。 参考链接 TEW-800MB (notion.site)https://warp-desk-89d.notio…

从宏观到微观——泽攸科技ZEM系列台式扫描电子显微镜在岩石分析中的应用

岩石作为地球地壳的主要构成物质之一&#xff0c;其微观结构对于了解地质过程、资源勘探以及工程建设具有重要意义。按照岩石的成因&#xff0c;可以把它们分为三类&#xff1a;岩浆岩、沉积岩和变质岩。在地球表面&#xff0c;沉积岩占据75%的份额&#xff0c;而在地壳深度&am…

Family Day/园区参观路径(C语言)

题目描述 园区某部门举办了Family Day&#xff0c;邀请员工及其家属参加&#xff1b; 将公司园区视为一个矩形&#xff0c;起始园区设置在左上角&#xff0c;终点园区设置在右下角&#xff1b; 家属参观园区时&#xff0c;只能向右和向下园区前进&#xff0c;求从起始园区到终…

低代码中的工作流:简化开发流程,提升效率

低代码开发平台近年来在软件开发领域引起了广泛的关注和应用。它以提高开发效率、降低开发成本为目标&#xff0c;通过简化开发过程&#xff0c;使非专业开发者也能快速构建高品质的应用程序。其中&#xff0c;工作流引擎作为低代码开发平台的重要组成部分&#xff0c;对于提升…

使用C# Net6连接国产达梦数据库记录

达梦官网&#xff1a;http://www.dameng.com/ 1 下载达梦并进行安装 下载地址&#xff1a;官网首页——服务与合作——下载中心&#xff08;https://www.dameng.com/list_103.html&#xff09; 根据需要自行下载需要的版本&#xff0c;测试版本为&#xff1a;x86 win64 DM8版…

设计师必看!哪个云渲染平台便宜?

渲染100 溜云库 渲云 平均价格 9.27 9.37 9.51 Camera007 5.81 6.1 4.7 Camera008 18.66 17…

【C语言】中的位操作符和移位操作符,原码反码补码以及进制之间的转换

欢迎大家来到c语言知识小课堂&#xff0c;今天的知识点是操作符和进制 目录 一、进制之间的转化1、什么是二进制&#xff0c;八进制&#xff0c;十进制&#xff0c;十六进制2、进制之间的转化其他进制转化为十进制十进制转化为二进制二进制转化为八进制八进制转化为二进制二进…

三维GIS开发的就业前景

一、前言 三维GIS是一个伪概念,GIS是地理信息系统&#xff0c;三维GIS就是三维地理信息系统&#xff0c;在课本上&#xff0c;专业概念上&#xff0c;也没有这一说法吧&#xff0c;所以三维GIS&#xff0c;就是技术人员造概念拼凑造出来的&#xff0c;本质上就是GIS三维可视化…

【学习笔记】数据结构与算法03:栈与队列

知识出处&#xff1a;Hello算法&#xff1a;https://www.hello-algo.com/. 文章目录 2.2 栈和队列2.2.1 「栈 stack」2.2.1.1 栈的常用操作2.2.1.2 栈的典型应用 2.2.2「队列 queue」2.2.2.1 队列的常用操作2.2.2.2 队列的典型应用 2.2.3 双向队列 「double-ended queue」2.2.3…
最新文章