git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fwd: Issue with 'git add --patch' after editor closes

From
DEDana Escoli <dana.escoli.2@gmail.com>
Date
Mar 7, 2026, 21:52 UTC
Message-ID
<CADCPJ26LU9kXNH04mPk_+u6Y=m-eSEH6ifHzHWN5tkM=pGpwJA@mail.gmail.com>
In-Reply-To
<CADCPJ26F633ftXb_pJrotQNrYCUNXCpBDDP12bBNtkGwudCqqA@mail.gmail.com>

Hi everyone. Maybe you can help me. The issue: I'm using the bash.exe from the Git installation in Windows 10 (git version 2.48.1.windows.1), and when I close the editor after editing the hunk, the command line doesn't echo the keyboard inputs anymore. Even ctrl+C doesn't respond; but, with ctrl+Z I see that it's taking the inputs, but there seems to be a single quote at the beginning, messing everything up:

'2/20) Stage this hunk [y,n,q,a,d,K,j,J,g,/,s,e,p,?]? Only one letter is expected, got 'n

(2/20) Stage this hunk [y,n,q,a,d,K,j,J,g,/,s,e,p,?]?

In this example I typed "n" (it didn't appear in the console), then pressed enter, and after nothing happened, I pressed ctrl+Z and got those two lines (notice the single quote before the "n", and the one at the beginning of the line) and the 'git add' finished.

Now, if I use the git-bash.exe this doesn't happen. It works fine. But I'm using it from Intellij's terminal, and git-bash opens its own independent window. I tried with notepad and notepad++ with the same result. Also tried from cmd with the same result, so I think Intellij has nothing to do.

Any idea why this is happening and how to solve it? Thanks. Dana

Message 1 of 1 in “Fwd: Issue with 'git add --patch' after editor closes”
  1. Dana EscoliMar 7, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.