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

Ant*_*deo 6 git interactive git-add

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

Stage this hunk [y,n,q,a,d,/,K,j,J,g,s,e,?]?
Run Code Online (Sandbox Code Playgroud)

无论如何,让git移动到下一个大块而不必击中Enter

mip*_*adi 8

是.将config选项设置interactive.singlekeytrue:

git config --global interactive.singlekey true
Run Code Online (Sandbox Code Playgroud)

  • 这将改变我的生活 (2认同)