我正在使用 Git 2.7.4。我的 ~/.config/git/config
文件中有以下片段:
[interactive]
singleKey = true
但是,当我运行 git add -p
时,我仍然需要在选择 hunk 后按回车键。这可能是什么原因造成的?
最佳答案
根据 git-config
documentation interactive.singleKey
选项需要安装 Perl 模块 Term::ReadKey
才能正常工作。请检查您的系统上是否安装了此模块,如果没有,请使用适当的命令安装它。例如。在 Linux 系统上,它将是:
sudo cpan Term::ReadKey
关于git - 为什么Git的单键设置不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50989610/