如何让git add -p接受击键而不等我按Enter键?

时间:2015-08-19 20:32:13

标签: git interactive git-add

git add -p非常便于以交互方式暂存更改。在每次更改时,它会提示用户按一个键以确定Git应对所涉及的更改执行的操作:

Stage this hunk [y,n,q,a,d,/,K,j,J,g,s,e,?]?

有没有让git移动到下一个大块而不必点击 Enter

1 个答案:

答案 0 :(得分:7)

是。将配置选项interactive.singlekey设置为true

git config --global interactive.singlekey true
相关问题