From e1a2bd6663fdc6daa45bb91eccc81922e9551760 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Tue, 28 Apr 2015 18:30:38 -0500 Subject: [PATCH] Add Single Key Presses in Interactive Mode as a git til. --- README.md | 1 + git/single-key-presses-in-interactive-mode.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 git/single-key-presses-in-interactive-mode.md diff --git a/README.md b/README.md index 251bd87..0e6465a 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Dry Runs in Git](git/dry-runs-in-git.md) - [Intent To Add](git/intent-to-add.md) - [List Untracked Files](git/list-untracked-files.md) +- [Single Key Presses in Interactive Mode](git/single-key-presses-in-interactive-mode.md) - [Staging Changes Within Vim](git/staging-changes-within-vim.md) - [Stashing Untracked Files](git/stashing-untracked-files.md) - [Verbose Commit Message](git/verbose-commit-message.md) diff --git a/git/single-key-presses-in-interactive-mode.md b/git/single-key-presses-in-interactive-mode.md new file mode 100644 index 0000000..b060c58 --- /dev/null +++ b/git/single-key-presses-in-interactive-mode.md @@ -0,0 +1,16 @@ +# Single Key Presses in Interactive Mode + +When staging changes in interactive mode (`git add -p`), you have a number +of options associated with single keys. `y` is *yes*, `n` is *no*, `a` is +*this and all remaining*, and so on. + +By default, you have to press *enter* after making your selection. However, +it can be configured for single key presses. Add the following to your git +configuration file to enable single key presses for interactive mode: + +``` +[interactive] + singlekey = true +``` + +[source](https://github.com/hashrocket/dotmatrix/blob/master/.gitconfig#L33-L34)