1

I'm running git commands from Pycharm's terminal using Powershell, on Windows. It sometimes gets stuck after I resize the terminal pane, when I press Q, it just goes to a new line, but I don't get a new Powershell prompt, it just gets stuck there instead.

EDIT: This is not limited to Pycharm. It's also happening from Windows Terminal. However it does not happen using Powershell's own terminal or that of cmd. It seems to be only for terminals that make git-log print new lines (as if I was pressing Enter) while resizing the window.

I have tried hitting Q again, Ctrl+C, Escape, and other combinations of keys. Nothing works. I need to close the terminal and open a new one to be able to issue new commands.

LoneCodeRanger
  • 413
  • 6
  • 18
  • I'm having the same issue seemingly out of no where. I had to disable my pager, but would love to know it you found a fix – Otus Apr 24 '23 at 23:41
  • No fix found, but it happens so rarely that I'm happy just killing my pageer's process (`less.exe`) whenever it happens. – LoneCodeRanger Apr 26 '23 at 06:04
  • Weird, it's happening quite often for me. Both in Powershell and through WSL. I've had to disable paging in Git – Otus Apr 26 '23 at 16:17
  • Well, I just learned to avoid resizing my terminals... Is it happening to you in other contexts besides after a resize? – LoneCodeRanger Apr 27 '23 at 13:54
  • Yeah it happens to me regardless of resizing unfortunately – Otus Apr 29 '23 at 00:45

1 Answers1

0

I figured out what to do. From this answer, I understood that the process actually hanging is not git itself, but another one called less. Killing less (for instance using Windows' Task Manager) solves the issue.

Of course, this is just a workaround while the bug gets fixed.

LoneCodeRanger
  • 413
  • 6
  • 18
  • Have you reported the 'bug' to the appropriate project? If so, please provide a link to the ticket so people in the future can tell if and in what version it has been fixed. – LinFelix Apr 27 '23 at 13:47