【工具类】git log 常用别名,git log 干活,git log常用参数
git log 常用参数及 .gitconfig 配置
- git log 常用参数及 .gitconfig 配置
- 干货,执行下边命令,添加别名
- git log 参数
- 参考资料
干货,执行下边命令,添加别名
- 注意,需要将 knowledgebao 修改为自己的名字,根据自己需要添加,常用的别名有:st ll lg lga lgb
- 执行下边语句,添加各种快捷键,执行 git lm, git lms, git ls, git lsm … 等试试效果吧
git config --global alias.co "checkout"
git config --global alias.ck "checkout --track -b" # checkout and tracked
git config --global alias.ci "commit"
git config --global alias.cl "clean -x -d -f" # force clean and remove ignored files.
git config --global alias.st "status"
git config --global alias.sst "status --ignore-submodules=all"
git config --global alias.pl "pull"
git config --global alias.ps "push"
git config --global alias.lb "remote show origin" # list branch
git config --global alias.li "status --short --porcelain --ignored" # list ignored
git config --global alias.lo "ls-files -o '--exclude=build/*' '--exclude=.vscode/*'" # list others
git config --global alias.cp "cherry-pick"
git config --global alias.ca "commit -a"
git config --global alias.br "branch"
git config --global alias.df "diff --ignore-cr-at-eol --ignore-space-at-eol"
git config --global alias.dc "diff --cached --ignore-cr-at-eol --ignore-space-at-eol"
git config --global alias.m "merge"
git config --global alias.dt "difftool"
git config --global alias.mt "mergetool"
git config --global alias.desc "describe --tags --long"# 通过 git lm 查看自己的修改记录,关键字 --author --abbrev-commit
git config --global alias.lm "log --no-merges --color --author='knowledgebao' --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cblue %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit"# 通过 git lms 查看自己的修改记录, 同步显示被修改的文件,关键字 --stat --author --abbrev-commit
git config --global alias.lms "log --no-merges --color --stat --author='knowledgebao' --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cblue %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit"# 通过 git ls 查看所有的修改记录,关键字 --graph --abbrev-commit
git config --global alias.ls "log --no-merges --color --graph --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cblue %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit"# 通过 git lss 查看所有的修改记录,同步显示被修改的文件,关键字 --stat --graph --abbrev-commit
git config --global alias.lss "log --no-merges --color --stat --graph --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cblue %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit"# 通过 git ll 关键字 --first-parent
git config --global alias.ll "log --graph --oneline --abbrev-commit --decorate --first-parent --pretty='tformat:%ai %C(auto) %h %d %s %Cblue<%an %ar>'"# 通过 git lg 关键字 --branches
git config --global alias.lg "log --graph --oneline --abbrev-commit --decorate --branches --pretty='format:%C(auto) %h %d %s %Cblue<%an %ar>'"# 通过 git lga 关键字 --all
git config --global alias.lga "log --graph --oneline --abbrev-commit --decorate --all --pretty='format:%C(auto) %h %d %s %Cblue<%an %ar>'"# 通过 git lgb 关键字 --all --simplify-by-decoration
git config --global alias.lgb "log --graph --oneline --abbrev-commit --decorate --all --simplify-by-decoration --pretty='format:%C(auto) %h %d %s %Cblue<%an %ar>'"
执行后 ~/gitconfig 文件内容增加了下边内容
[alias]co = checkoutck = checkout --track -bci = commitcl = clean -x -d -fst = statussst = status --ignore-submodules=allpl = pullps = pushlb = remote show originli = status --short --porcelain --ignoredlo = ls-files -o '--exclude=build/*' '--exclude=.vscode/*'cp = cherry-pickca = commit -abr = branchdf = diff --ignore-cr-at-eol --ignore-space-at-eoldc = diff --cached --ignore-cr-at-eol --ignore-space-at-eolm = mergedt = difftoolmt = mergetooldesc = describe --tags --longlm = log --no-merges --color --author='knowledgebao' --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cblue %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commitlms = log --no-merges --color --stat --author='knowledgebao' --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cblue %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commitls = log --no-merges --color --graph --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cblue %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commitlss = log --no-merges --color --stat --graph --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cblue %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commitll = log --graph --oneline --abbrev-commit --decorate --first-parent --pretty='tformat:%ai %C(auto) %h %d %s %Cblue<%an %ar>'lg = log --graph --oneline --abbrev-commit --decorate --branches --pretty='format:%C(auto) %h %d %s %Cblue<%an %ar>'lga = log --graph --oneline --abbrev-commit --decorate --all --pretty='format:%C(auto) %h %d %s %Cblue<%an %ar>'lgb = log --graph --oneline --abbrev-commit --decorate --all --simplify-by-decoration --pretty='format:%C(auto) %h %d %s %Cblue<%an %ar>'
git log 参数
git log --help 查看,1700多行帮助
--follow--no-decorate, --decorate[=short|full|auto|no]--decorate-refs=<pattern>, --decorate-refs-exclude=<pattern>--source--[no-]use-mailmap--full-diff--log-size--summary, --name-only, --name-status, --check) are not currently implemented.--grep=<pattern> further limits to commits whose log message has a line that matches <pattern>), unless otherwise noted.--skip=<number>--since=<date>, --after=<date>--until=<date>, --before=<date>--author=<pattern>, --committer=<pattern>--author=<pattern>, commits whose author matches any of the given patterns are chosen (similarly for multiple --committer=<pattern>).--grep-reflog=<pattern>--grep=<pattern>--grep=<pattern>, commits whose message matches any of the given patterns are chosen (but see --all-match).--all-match--invert-grep--basic-regexp--remove-empty--merges--no-merges--min-parents=<number>, --max-parents=<number>, --no-min-parents, --no-max-parents--min-parents=2 is the same as --merges. --max-parents=0 gives all root commits and --min-parents=3 all octopus merges.--no-min-parents and --no-max-parents reset these limits (to no limit) again. Equivalent forms are --min-parents=0 (any commit has 0 or more--first-parent--not--all--branches[=<pattern>]--tags[=<pattern>]--remotes[=<pattern>]--glob=<glob-pattern>--exclude=<glob-pattern>--reflog--alternate-refs--single-worktree--ignore-missing--bisect--stdin--cherry-mark--cherry-pick--left-only, --right-only--cherry--merge--boundary--simplify-by-decoration--full-history--dense--sparse--simplify-merges--ancestry-path--full-history without parent rewriting--full-history with parent rewriting--dense--sparse--simplify-merges--ancestry-path--date-order--author-date-order--topo-order---1----2----4----7--reverse--no-walk[=(sorted|unsorted)]--do-walk--pretty[=<format>], --format=<format>--pretty=tformat:<format> were given.--abbrev-commit--no-abbrev-commit--oneline--encoding=<encoding>--expand-tabs=<n>, --expand-tabs, --no-expand-tabs--expand-tabs=0, which disables tab expansion.--notes[=<ref>]--no-notes--show-notes[=<ref>], --[no-]standard-notes--show-signature--relative-date--date=<format>--date=relative shows dates relative to the current time, e.g. “2 hours ago”. The -local option has no effect for --date=relative.--date=local is an alias for --date=default-local.--date=iso (or --date=iso8601) shows timestamps in a ISO 8601-like format. The differences to the strict ISO 8601 format are:--date=iso-strict (or --date=iso8601-strict) shows timestamps in strict ISO 8601 format.--date=rfc (or --date=rfc2822) shows timestamps in RFC 2822 format, often found in email messages.--date=short shows only the date, but not the time, in YYYY-MM-DD format.--date=raw shows the date as seconds since the epoch (1970-01-01 00:00:00 UTC), followed by a space, and then the timezone as an offset from--date=human shows the timezone if the timezone does not match the current time-zone, and doesn’t print the whole date if that matches (ie--date=unix shows the date as a Unix epoch timestamp (seconds since 1970). As with --raw, this is always in UTC and therefore -local has no--date=format:... feeds the format ... to your system strftime, except for %z and %Z, which are handled internally. Use --date=format:%c to--date=default is the default format, and is similar to --date=rfc2822, with a few exceptions:--parents--children--left-right--graph--show-linear-break[=<barrier>]--cc--combined-all-paths--cc are specified, and is likely only useful if filename changes are detected (i.e. when either rename or copy detection have been--raw. To get full object names in a raw diff format, use --no-abbrev.--output=<file>--output-indicator-new=<char>, --output-indicator-old=<char>, --output-indicator-context=<char>--raw--patch-with-raw--indent-heuristic--no-indent-heuristic--minimal--patience--histogram--anchored=<text>--diff-algorithm={patience|minimal|histogram|myers}--diff-algorithm=default option.--stat[=<width>[,<name-width>[,<count>]]]--stat-graph-width=<width> (affects all commands generating a stat graph) or by setting diff.statGraphWidth=<width> (does not affect git--compact-summary--numstat--shortstat--cumulative--dirstat-by-file[=<param1,param2>...]--summary--patch-with-stat--name-only--name-status--submodule[=<format>]--color[=<when>]--no-color--color-moved[=<mode>]--no-color-moved--color-moved-ws=<modes>--no-color-moved-ws--color-moved-ws=no.--word-diff[=<mode>]--word-diff-regex=<regex>--color-words[=<regex>]--no-renames--[no-]rename-empty--check--ws-error-highlight=<kind>--full-index--binary--abbrev[=<n>]--find-copies-harder--diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]--find-object=<object-id>--pickaxe-all--pickaxe-regex--relative[=<path>]--ignore-cr-at-eol--ignore-space-at-eol--ignore-blank-lines--inter-hunk-context=<lines>--ext-diff--no-ext-diff--textconv, --no-textconv--ignore-submodules[=<when>]--src-prefix=<prefix>--dst-prefix=<prefix>--no-prefix--line-prefix=<prefix>--ita-invisible-in-index--ita-visible-in-index. Both options are experimental and could be removed in future.--- a/describe.c--- a/file--- a/file--- a/file--- a/file--notes=<ref> option.
–abbrev-commit 仅显示 SHA-1 的前几个字符,而非所有的 40 个字符。
–stat 显示每次更新的文件修改统计信息
–graph 显示 ASCII 图形表示的分支合并历史。
–no-merges 没有合并的提交信息
–color
–oneline --pretty=oneline --abbrev-commit 合用的简写。
–decorate 参数用来显示一些相关的信息,如HEAD、分支名、tag名等
–first-parent 紧当前分支的父分支
–author=‘xxx’ 提交至,使用单引号
–date=format:‘%Y-%m-%d %H:%M:%S’ 时间格式
–pretty 使用其他格式显示历史提交信息。可用的选项包括 oneline,short,full,fuller 和 format(后跟指定格式)
–pretty=format:‘%C(red)%h%Creset -%C(yellow)%d%C(blue) %s %C(green)(%cd) %C(bold blue)<%an>%C(reset)’
–pretty=format:‘%C(auto) %h %d %s %C(blue)<%an %ar>’
–pretty=format:‘%ai %C(auto) %h %d %s %C(blue)<%an %ar>’
- format:
- %H 提交对象(commit)的完整哈希字串
- %h 提交对象的简短哈希字串
- %T 树对象(tree)的完整哈希字串
- %t 树对象的简短哈希字串
- %P 父对象(parent)的完整哈希字串
- %p 父对象的简短哈希字串
- %an 作者(author)的名字
- %ae 作者的电子邮件地址
- %ad 作者修订日期(可以用 -date= 选项定制格式)
- %ar 作者修订日期,按多久以前的方式显示
- %cn 提交者(committer)的名字
- %ce 提交者的电子邮件地址
- %cd 提交日期
- %cr 提交日期,按多久以前的方式显示
- %s 提交说明
- %ai author date, ISO 8601-like format
参考资料
- git log命令全解析
- 2.3 Git 基础 - 查看提交历史
- git log命令全解析
- git log 常用命令及技巧
相关文章:
【工具类】git log 常用别名,git log 干活,git log常用参数
git log 常用参数及 .gitconfig 配置 git log 常用参数及 .gitconfig 配置 干货,执行下边命令,添加别名git log 参数参考资料 干货,执行下边命令,添加别名 注意,需要将 knowledgebao 修改为自己的名字,…...
[linux] AttributeError: module ‘transformer_engine‘ has no attribute ‘pytorch‘
[BUG] AttributeError: module transformer_engine has no attribute pytorch Issue #696 NVIDIA/Megatron-LM GitHub 其中这个答案并没有解决我的问题: import flash_attn_2_cuda as flash_attn_cuda Traceback (most recent call last): File "<stdi…...
前端面试题---->JavaScript
const声明的对象属性和数组的值可以被修改吗?为什么 原因:当使用const声明一个对象或数组时,实际上是保证了对象或数组的引用不会被修改,但对象或数组本身的属性或元素是可以被修改的。这是因为const只能保证指向的内存地址不变&a…...
spring 的理解
spring 的理解 spring 是一个基础的框架,同时提高了一个Bean 的容器,用来装载Bean对象spring会帮我们创建Bean 对象并维护Bean对象 的生命周期。在spring 框架上,还有springCloud,spring Boot 的技术框架,都是以Spring为基石的sp…...
【Java程序设计】【C00384】基于(JavaWeb)Springboot的民航网上订票系统(有论文)
【C00384】基于(JavaWeb)Springboot的民航网上订票系统(有论文) 项目简介项目获取开发环境项目技术运行截图 博主介绍:java高级开发,从事互联网行业六年,已经做了六年的毕业设计程序开发&#x…...
如何查看局域网内所有的ip和对应的mac地址
1、windows下查看 方法一、 按快捷键“winr”打开运行界面,输入“CMD”回车: 输入以下命令: for /L %i IN (1,1,254) DO ping -w 1 -n 1 192.168.0.%i 其中 192.168.0.%i 部分要使用要查询的网段,比如 192.168.1.%i 192.168.137.%i 172.16.2…...
应用层协议 - HTTP
文章目录 目录 文章目录 前言 1 . 应用层概要 2. WWW 2.1 互联网的蓬勃发展 2.2 WWW基本概念 2.3 URI 3 . HTTP 3.1 工作过程 3.2 HTTP协议格式 3.3 HTTP请求 3.3.1 URL基本格式 3.3.2 认识方法 get方法 post方法 其他方法 3.3.2 认识请求报头 3.3.3 认识请…...
mysql安装及操作
一、Mysql 1.1 MySQL数据库介绍 1.1.1 什么是数据库DB? DB的全称是database,即数据库的意思。数据库实际上就是一个文件集合,是一个存储数据的仓库,数据库是按照特定的格式把数据存储起来,用户可以对存储的数据进行…...
【计算机操作系统】深入探究CPU,PCB和进程工作原理
˃͈꒵˂͈꒱ write in front ꒰˃͈꒵˂͈꒱ ʕ̯•͡˔•̯᷅ʔ大家好,我是xiaoxie.希望你看完之后,有不足之处请多多谅解,让我们一起共同进步૮₍❀ᴗ͈ . ᴗ͈ აxiaoxieʕ̯•͡˔•̯᷅ʔ—CSDN博客 本文由xiaoxieʕ̯•͡˔•̯᷅ʔ 原创 CSDN 如…...
Pillow教程04:学习ImageDraw+Font字体+alpha composite方法,给图片添加文字水印
---------------Pillow教程集合--------------- Python项目18:使用Pillow模块,随机生成4位数的图片验证码 Python教程93:初识Pillow模块(创建Image对象查看属性图片的保存与缩放) Pillow教程02:图片的裁…...
fastjson2 反序列化包含多层泛型结构的实体类
前言 由于使用到httpUtill来调用接口 工具类的返回是字符串 其中接口的实现返回值是个多层泛型结构的实体类 例如Result<Page<UserDto>> 当使用 JSON.parseObject("res",new TypeReference<Result<Page<UserDto>>>{})发现在page中存在…...
P6学习:解析P6 WBS-工作分解结构的原则
前言 WBS,及Work Breakdown Structure,中文工作分解结构,是总结工作阶段的项目的层次结构分解。 WBS 就像项目的大纲——它将项目分解为特定的可交付成果或阶段。 然后将活动添加到这些层中以创建项目计划的时间表。 WBS 使用流程会有所不…...
C++ empalce_back 和 push_back的区别
在C中,push_back和emplace_back都是向容器(如std::vector、std::list等)尾部添加元素的成员函数。它们的主要区别在于元素的构造方式和参数传递方式。 push_back函数接受一个已经构造好的元素,并将其复制或移动到容器的尾部。这意…...
java1.8常考面试题
在Java 1.8版本中,引入了很多重要的新特性,这些特性常常成为面试的焦点。下面是一些在面试中常见的关于Java 1.8的问题及其解答,帮助你准备面试: 1. Java 1.8的主要新特性有哪些? Lambda表达式(Lambda Ex…...
Java 中的业务是指什么?
在 Java 编程中,业务(Business)是指软件系统中负责实现特定功能或处理特定任务的一组逻辑和功能。业务通常是指与业务需求直接相关的功能和处理过程,包括数据处理、业务逻辑、交易处理、业务规则等。在软件开发中,业务…...
【MySQL】聊聊自增id用完怎么办?
在实际的开发中,一般都会将数据存储到数据库中,在设计表的时候,其实id如果达到最大值的话,会出现什么问题。其实主要分两种情况,一种是设置了主键id,另一种没有设置主键id。 表定义自增值id create table…...
新能源汽车充电桩主板各模块成本占比解析
汽车充电桩主板是汽车充电桩的重要组件,主要由微处理器模块、通信模块、控制模块、安全保护模块、传感器模块等多个模块构成。深入探究各模块在总成本中的比重,我们可以更好地优化成本结构、提高生产效率,并为未来的技术创新和市场需求变化做…...
【面试经典150 | 动态规划】三角形最小路径和
文章目录 写在前面Tag题目来源解题思路方法一:动态规划 写在最后 写在前面 本专栏专注于分析与讲解【面试经典150】算法,两到三天更新一篇文章,欢迎催更…… 专栏内容以分析题目为主,并附带一些对于本题涉及到的数据结构等内容进行…...
【线段树二分】第十三届蓝桥杯省赛C++ A组/研究生组 Python 研究生组《扫描游戏》(C++)
【题目描述】 有一根围绕原点 O 顺时针旋转的棒 OA,初始时指向正上方(Y 轴正向)。 在平面中有若干物件,第 i 个物件的坐标为(,),价值为 。 当棒扫到某个物件时,棒的长度会瞬间增长 ÿ…...
类模板与继承及成员、全局函数的实现
一、类模板与继承 当类模板碰到继承时,需要注意一下几点: 1.当子类继承的父类是一个类模板时,子类在声明的时候,要指定出父类中T的类型 2.如果不指定,编译器无法给子类分配内存 3.如果想灵活指定出父类中T的类型&a…...
[特殊字符] 智能合约中的数据是如何在区块链中保持一致的?
🧠 智能合约中的数据是如何在区块链中保持一致的? 为什么所有区块链节点都能得出相同结果?合约调用这么复杂,状态真能保持一致吗?本篇带你从底层视角理解“状态一致性”的真相。 一、智能合约的数据存储在哪里…...
MySQL 隔离级别:脏读、幻读及不可重复读的原理与示例
一、MySQL 隔离级别 MySQL 提供了四种隔离级别,用于控制事务之间的并发访问以及数据的可见性,不同隔离级别对脏读、幻读、不可重复读这几种并发数据问题有着不同的处理方式,具体如下: 隔离级别脏读不可重复读幻读性能特点及锁机制读未提交(READ UNCOMMITTED)允许出现允许…...
MMaDA: Multimodal Large Diffusion Language Models
CODE : https://github.com/Gen-Verse/MMaDA Abstract 我们介绍了一种新型的多模态扩散基础模型MMaDA,它被设计用于在文本推理、多模态理解和文本到图像生成等不同领域实现卓越的性能。该方法的特点是三个关键创新:(i) MMaDA采用统一的扩散架构…...
在四层代理中还原真实客户端ngx_stream_realip_module
一、模块原理与价值 PROXY Protocol 回溯 第三方负载均衡(如 HAProxy、AWS NLB、阿里 SLB)发起上游连接时,将真实客户端 IP/Port 写入 PROXY Protocol v1/v2 头。Stream 层接收到头部后,ngx_stream_realip_module 从中提取原始信息…...
剑指offer20_链表中环的入口节点
链表中环的入口节点 给定一个链表,若其中包含环,则输出环的入口节点。 若其中不包含环,则输出null。 数据范围 节点 val 值取值范围 [ 1 , 1000 ] [1,1000] [1,1000]。 节点 val 值各不相同。 链表长度 [ 0 , 500 ] [0,500] [0,500]。 …...
2025 后端自学UNIAPP【项目实战:旅游项目】6、我的收藏页面
代码框架视图 1、先添加一个获取收藏景点的列表请求 【在文件my_api.js文件中添加】 // 引入公共的请求封装 import http from ./my_http.js// 登录接口(适配服务端返回 Token) export const login async (code, avatar) > {const res await http…...
C++ 求圆面积的程序(Program to find area of a circle)
给定半径r,求圆的面积。圆的面积应精确到小数点后5位。 例子: 输入:r 5 输出:78.53982 解释:由于面积 PI * r * r 3.14159265358979323846 * 5 * 5 78.53982,因为我们只保留小数点后 5 位数字。 输…...
在鸿蒙HarmonyOS 5中使用DevEco Studio实现录音机应用
1. 项目配置与权限设置 1.1 配置module.json5 {"module": {"requestPermissions": [{"name": "ohos.permission.MICROPHONE","reason": "录音需要麦克风权限"},{"name": "ohos.permission.WRITE…...
什么是Ansible Jinja2
理解 Ansible Jinja2 模板 Ansible 是一款功能强大的开源自动化工具,可让您无缝地管理和配置系统。Ansible 的一大亮点是它使用 Jinja2 模板,允许您根据变量数据动态生成文件、配置设置和脚本。本文将向您介绍 Ansible 中的 Jinja2 模板,并通…...
Hive 存储格式深度解析:从 TextFile 到 ORC,如何选对数据存储方案?
在大数据处理领域,Hive 作为 Hadoop 生态中重要的数据仓库工具,其存储格式的选择直接影响数据存储成本、查询效率和计算资源消耗。面对 TextFile、SequenceFile、Parquet、RCFile、ORC 等多种存储格式,很多开发者常常陷入选择困境。本文将从底…...
