我想你可能写过这样的命令:
$ git log --oneline --decorate --graph --all * 1b63c87 (HEAD -> master) add description of dev.md | * 40a00ae (testing) add description of testing.md | * dd4555e add testing.md |/ * fd2e1cb add dev.md * 57b75e6 (origin/master) Add GitHub description. # 省略
这条命令显示一个很好看的git提交历史图。
但是这个命令很长,为了让我们用的更轻松一些,git提供了别名功能。
$ git config --global alias.lg "log --oneline --decorate --graph --all"
运行上面的命令后,git lg
命令就是git log --oneline --decorate --graph --all
命令的别名,也就是说运行前者实际上是在运行后者,所以写前者就行啦!
本文分享自微信公众号 - mwangblog(mwangblog),作者:WM
原文出处及转载信息见文内详细说明,如有侵权,请联系 yunjia_community@tencent.com 删除。
原始发表时间:2018-01-17
本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。
我来说两句