Git: How to stage hunks with a single key press

Posted Over 3 years ago. Visible to the public. Repeats.

In interactive commands, Git allows the user to provide one-letter input with a single key without hitting enter ( docs Show archive.org snapshot ).

# Enabled this feature globally
git config --global interactive.singlekey true

# Or enable this feature locally for a single repository
git config interactive.singlekey true

This allows you to hit "y" instead of "y + ENTER" to move to the next hunk.

Stage this hunk [y,n,q,a,d,s,e,?]?
Last edit
Over 3 years ago
Emanuel
License
Source code in this card is licensed under the MIT License.
Posted by Emanuel to makandra dev (2020-08-25 06:10)