threads / discuss / 65163

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

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

## tl;dr

One message between Mar 7, 2026 and Mar 7, 2026.

replies: 0people: 1as markdown or json

Dana Escoli· Mar 7, 2026, 21:52 UTC · lore

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

← back to recent threads