6

我希望能够区分对我的 encrypted 的更改config/credentials.yml.enc

git diff单独显示加密文件内容的差异。我想看看明文的变化。

如何获得config/credentials.yml.enc文件的人类可读差异?

4

1 回答 1

10

如果您使用rails encrypted:show而不是rails credentials:show将文件作为参数,这将起作用。

对于全局配置,添加到您的 .gitconfig

[diff "enc"]
  textconv = rails encrypted:show
  cachetextconv = false

然后在 ~/.config/git/attributes

*.yml.enc diff=enc
于 2018-05-22T11:42:25.540 回答