git - 如何让 'git log'默认装饰

标签 git git-log

我经常输入 git log 而我真正想要的是 git log --decorate。如何让它默认装饰?

我看到过很多类似“创建别名 lg 然后键入 git lg 而不是 git log” 形式的答案。但是,我无法在任何地方找到如何更改 git log 本身的默认行为。 alias log 不起作用。

最佳答案

git config log.decorate auto

对于全局设置,添加 --global 参数。

那就是:

git config --global log.decorate auto

别名是用 git config alias.lg "log --decorate"

创建的

关于git - 如何让 'git log'默认装饰,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21607305/

相关文章:

git - git log --graph 中的线条颜色是什么意思?

git - 将两个不同的 git 存储库放在一起而不会丢失任何一个历史记录

裸仓库上的 git diff

git - git log --oneline --graph 输出的意义

git - 列出 git 标签名称、日期和消息

git - git 中的损坏分支,致命 : your current branch appears to be broken

Git:错误:RPC 失败;结果=22,HTTP 代码=411

git - 有没有办法递归 merge 然后重新设置所有分支?

git - 使用 SVN 连接到 git 存储库

git - git打开文件的命令