git log的个性化设置
--date=(relative|local|default|iso|rfc|short|raw)
Only takes effect for dates shown in human-readable format,
such as when using "--pretty". log.date config variable
sets a default value for log command’s --date option.
--date=relative shows dates relative to the current time, e.g. "2 hours ago".
--date=local shows timestamps in user’s local timezone.
--date=iso (or --date=iso8601) shows timestamps in ISO 8601 format.
--date=rfc (or --date=rfc2822) shows timestamps in RFC 2822 format,
often found in E-mail messages.
--date=short shows only date but not time, in YYYY-MM-DD format.
--date=raw shows the date in the internal raw git format %s %z format.
--date=default shows timestamps in the original timezone
(either committer’s or author’s).
.gitconfig中天上下面这样, 就很好了
git config --global pretty=xxxxx
git config --global log.date=xxxxx
[format]
pretty = " %Cred%h %Cgreen(%ad) %C(bold blue)<%an> %Creset%d %s "
[log]
date = iso8601
达到的效果就是:
git log --pretty=format:' %Cred%h %Cgreen(%ad) %C(bold blue)<%an> %Creset%d %s ' --date=format:'%Y-%m-%d %H:%M:%S' -n 100
的效果.
设置了全局之后, git log就按照上面的好看的格式出来了.
git log的个性化设置的更多相关文章
- 个性化你的Git Log的输出格式
git已经变成了很多程序员日常工具之一. git log是查看git历史的好工具,不过默认的格式并不是特别的直观. 很多时候想要更简便的输出更多或者更少的信息,这里列出几个git log的format ...
- 个性化你的 Git Log 的输出格式
个性化你的 Git Log 的输出格式
- Git log diff config高级进阶
Git 历史相关和 git config 高级进阶 前一段时间分享了一篇<更好的 git log>简要介绍怎么美化 git log 命令,其中提到了 alias命令,今天再继续谈谈 git ...
- Git log、diff、config 进阶
前一段时间分享了一篇<更好的 git log>简要介绍怎么美化 git log 命令,其中提到了 alias命令,今天再继续谈谈 git相关, 看看如何通过配置自己的 git config ...
- git log命令全解析,打log还能这么随心所欲!
git log命令非常强大而好用,在复杂系统的版本管理中扮演着重要的角色,但默认的git log命令显示出的东西实在太丑,不好好打扮一下根本没法见人,打扮好了用alias命令拍个照片,就正式出道了! ...
- PhpStorm 8.x/9.x 快捷键设置/个性化设置,如何多项目共存?如何更换主题?
1."自定义"常用快捷键(设置成跟Eclipse差不多) 按照路径:File -> Settings -> Appearance & Behavior -> ...
- IntelliJ IDEA 14.x 快捷键/个性化设置
常用快捷键设置(设置成跟Eclipse差不多) 按照路径:File -> Settings -> Appearance & Behavior -> Keymap -> ...
- PhpStorm快捷键设置/个性化设置,
#常用快捷键 设置快捷键:File -> Settings -> IDE Settings -> Keymap -> 选择“Eclipse” -> 然后“Copy”一份 ...
- git log 查看提交记录
git log 查看提交记录 1. git log 查看提交历史记录2. git log --oneline 或者 git log --pretty=oneline 以精简模式显示3. git log ...
随机推荐
- <foreach></foreach>标签
当传入参数为数组或者集合时需要通过<foreach></foreach>标签进行遍历 1.首先在po类中定义一个集合或者数组 比如 private List<Intege ...
- php 判断访问是否是手机或者pc
php代码 function isMobile() { $user_agent = $_SERVER['HTTP_USER_AGENT']; $mobile_agents = Array(" ...
- node.js配置环境变量
今天配置node.js的时候,碰到了配置环境变量的问题 为什么会出这样的问题: 因为我将 node.js 安装到了D盘,(这是个坑,以后一定要安到C盘),当我发现,我的node操作指令无效的时候,知道 ...
- ORACLE内存管理之ASMM AMM
ORACLE ASMM ORACLE AMM ASMM转换至AMM AMM转换至ASMM
- WPF UI Close button
<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/w ...
- 使用xshell连接Ubuntu虚拟机
1.下载安装VMware软件,可以试用. 2.新建虚拟机,选择典型安装,这里安装Ubuntu16.04 LTS,注意选择网络连接时设置为 桥接模式,在“编辑”--“虚拟网络编辑器”中将DHCP 池中的 ...
- 非web工程,打jar放shell执行
作为6年经验的程序员,一直在搞web服务应用开发,今天领导被吐槽了,只会web方面的东东,最基本的打包啥啥都不会.. 一般开发工程都是web项目,突然要求开发非web,不用tomcat装(浪费端口号) ...
- protel封装总结(新手必看)
零件封装是指实际零件焊接到电路板时所指示的外观和焊点的位置.是纯粹的空间概念.因此不同的元件可共用同一零件封装,同种元件也可有不同的零件封装.像电阻,有传统的针插式,这种元件体积较大,电路板必须钻孔才 ...
- postman小白教程
转载:之前看到的保存了下来,没有找到转载地址,所以如果侵权的话联系我加下转载地址,感觉这篇文章写的很好,详细
- ceph部署-常用命令
常用命令:1.ceph healthceph -s 2.ceph osd treeceph osd lspoolsceph osd pool [poolname] rbd pg_numceph osd ...