git log
来源:互联网 发布:java web 打印 编辑:程序博客网 时间:2024/06/05 16:31
git --help log可以查看git log的完整帮助
git log --oneline
git log --date=short --pretty=format:"%h %cd %s"
# 查看某文件的修改历史
1.cd $filedir文件所在路径
2.git log $filenamegit log + 文件名(搭配辅助参数)
# 创建别名alias
$ vi ~/.gitconfig
[ alias ]logl = log --onelinelogg = log --graph --date=short --pretty=format:'%C(yellow)%h%Creset %Cred%cd%Creset %Cgreen%s%Creset' --abbrev-commit测试:
$ git logg pthread.c
附录
这部分可以用help详细查看。
--date=(relative|local|default|iso|rfc|short|raw) --date=relative shows dates relative to the current time, e.g. "2 hours ago". --date=local is an alias for --date=default-local. --date=iso (or --date=iso8601) shows timestamps in a ISO 8601-like format. --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 in the internal raw Git format %s %z format. --date=format:... feeds the format ... to your system strftime. Use --date=format:%c to show the date in your system locale's preferred format. See the strftime manual for a complete list of format placeholders. When using -local, the correct syntax is --date=format-local:.... --date=default is the default format, and is similar to --date=rfc2822
选项 说明%H提交对象(commit)的完整哈希字串%h提交对象的简短哈希字串%T树对象(tree)的完整哈希字串%t树对象的简短哈希字串%P父对象(parent)的完整哈希字串%p父对象的简短哈希字串%an作者(author)的名字%ae作者的电子邮件地址%ad作者修订日期(可以用 -date= 选项定制格式)%ar作者修订日期,按多久以前的方式显示%cn提交者(committer)的名字%ce提交者的电子邮件地址%cd提交日期%cr提交日期,按多久以前的方式显示%s提交说明%Credswitch color to red%Cgreenswitch color to green%Cblueswitch color to blue%Cresetreset color%C(...)color specification, as described in color.branch.* config option;
阅读全文
0 0
- git log
- git log
- git log
- git log
- git log
- git-log
- git log
- git log
- git log .
- git log
- git log
- git# log
- git log
- git log
- git log
- git log
- Git commands / git log
- Git -> git log笔记
- 介绍Session和Cokkie不同之处
- ArcGIS——dwg与shp转换原理
- Xamarin XAML语言教程通过ProgressTo方法对进度条设置
- Socket网络编程学习笔记(1):常用方法介绍
- [订餐/外卖] 码上点餐源码 微赞/微擎码上点餐模块 微信外卖餐饮店内扫码点餐源码
- git log
- JEESZ分布式架构2--CentOs下安装Tomcat7(环境准备)
- Android电话拨打流程源码分析
- Horizon 二次开发-部署
- Linux VFS文件系统之打开(Open)文件
- 微信小程序之侧栏分类 —— 微信小程序实战商城系列(1)
- 常见错误排查
- SQLyog下创建存储过程
- MySQL自增长与锁的进一步认识