git - 在 git-show 上默认设置 color-words 选项

标签 git

配置 git-diff 以默认启用 color-words 很容易。

我如何同样配置 git-show 默认使用 color-words

到目前为止我发现的唯一选择是使用别名:

[alias]
sh = show --color-words

最佳答案

您可以使用[color "command"]。这是一个例子。您需要检查“显示”有哪些选项。

[color "diff"]
    frag = cyan
    new = green
    commit = yellow
[color "branch"]
    current = green
[color "status"]
    updated = green

关于git - 在 git-show 上默认设置 color-words 选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35066815/

相关文章:

git - 一个目录中的 2 个 git 存储库(共享 Dockerfile)

git - 由于 "HEALTH_CONSTRAINTS",AWS 部署失败

git - 删除了对密码身份验证的支持。请改用个人访问 token

git - 使用 git-tfs bridge 的最佳实践和问题

git - 执行 `Squash and Merge` 后可能出现问题?

git - 防止对后续 pull 请求重复提交

git - `git log --follow --graph` 跳过提交

git - sh 脚本 : using conditionals, git 更新后脚本

git - 轻量级标签可以转换为带注释的标签吗?

git - .gitignore 不忽略 package.json