Skip to content

Commit e1a2bd6

Browse files
committed
Add Single Key Presses in Interactive Mode as a git til.
1 parent 04693e3 commit e1a2bd6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
2525
- [Dry Runs in Git](git/dry-runs-in-git.md)
2626
- [Intent To Add](git/intent-to-add.md)
2727
- [List Untracked Files](git/list-untracked-files.md)
28+
- [Single Key Presses in Interactive Mode](git/single-key-presses-in-interactive-mode.md)
2829
- [Staging Changes Within Vim](git/staging-changes-within-vim.md)
2930
- [Stashing Untracked Files](git/stashing-untracked-files.md)
3031
- [Verbose Commit Message](git/verbose-commit-message.md)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Single Key Presses in Interactive Mode
2+
3+
When staging changes in interactive mode (`git add -p`), you have a number
4+
of options associated with single keys. `y` is *yes*, `n` is *no*, `a` is
5+
*this and all remaining*, and so on.
6+
7+
By default, you have to press *enter* after making your selection. However,
8+
it can be configured for single key presses. Add the following to your git
9+
configuration file to enable single key presses for interactive mode:
10+
11+
```
12+
[interactive]
13+
singlekey = true
14+
```
15+
16+
[source](https://github.com/hashrocket/dotmatrix/blob/master/.gitconfig#L33-L34)

0 commit comments

Comments
 (0)