"Signature of configuration file has changed!" 在 运行 ''overcommit --sign" 之后

"Signature of configuration file has changed!" after running ''overcommit --sign"

安装 overcommit 并签署 .overcommit.yml 本地文件后,我仍然收到 'sign' 要求。

$ overcommit --sign
Updating signature for configuration file...
$ git commit
Unable to load configuration from '/Users/sergii/w/profinda_saas/.overcommit.yml': Signature of configuration file has changed!
Run `overcommit --sign` once you've verified the configuration changes.

问题出在不同版本的 overcommit gem 中。 删除与用于创建 .overcommit.yml 文件的版本不同的版本。安装正确的版本并重新安装挂钩。

 $ gem uninstall overcommit
 $ gem install overcommit -v 0.46.0 
 $ overcommit --install
 $ overcommit --sign