简体   繁体   中英

PowerShell hangs when git log command is issued

I have installed poshgit and I use PowerShell to run git commands. It works great, except when I issue git log command, I see the following weird behavior :

The command returns with part of the log, I have to keep pressing enter for it to show me the rest of the log. When it reaches the first commit, it says END, but does not return the prompt. If I keep pressing Enter, it just keeps throwing END at me on a new line for every time I hit enter.

I would like git log to return log, and then return a command prompt so I can issue further git commands. Or if you can tell me how to force Powershell to take me to command prompt, that will do just as well. Currently, I am having to kill Powershell each time I issue git log, in order to get the prompt again.

I am on Windows 8.

git log works great for me from powershell.exe. Are you running in the ISE?

I noticed that 'git log' will pipe it's output to less.exe. The ISE will hang when a native command is interactive (like less.exe).

The workaround is to pipe the output, eg:

git log | out-default

When git notices that output is redirected, it does not pipe the output to a pager.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM