git add -p
is very convenient for staging changes in an interactive fashion. At each change, it prompts the user to press a key to determine what Git should do with the change in question:
Stage this hunk [y,n,q,a,d,/,K,j,J,g,s,e,?]?
Is there anyway to make git move onto the next hunk without having to hit Enter?
Press Win + R to open the Run box, then type "cmd" and hit Enter to open it. Press Win + X (or right-click the Start button) and choose Command Prompt from the menu. Depending on your Windows settings, this may show Windows PowerShell or Windows Terminal instead.
The issue ended up being a new feature of the windows 10 console. Under the default config, whenever you click on a command window in windows 10, it immediately halts the application process when it attempts to write to the console.
Yes. Set the config option interactive.singlekey
to true
:
git config --global interactive.singlekey true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With