Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
449 views
in Technique[技术] by (71.8m points)

Git Bash gets stuck on diff / log, spontaneously repeats same command over and over

I'm having an odd problem with Git Bash on Windows 7 / XP. It used to work fine, but recently I find that after I perform a git diff or git log, Git Bash becomes unusable: following the diff/log, even after I return to the command prompt, Bash keeps suddenly and apparently spontaneously repeating the same command, unprompted and while I'm in the middle of typing a subsequent command.

Has anyone else had this problem? Any advice would be much appreciated, because this is really limiting Git Bash's usefulness at the moment.

question from:https://stackoverflow.com/questions/7599014/git-bash-gets-stuck-on-diff-log-spontaneously-repeats-same-command-over-and-o

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You have to use q to quit git's pager. Using Ctrl-C only causes problems on windows.

Ctrl-C should not quit the pager (and it does not on a linux system). When you Ctrl-C on windows (msysgit I suppose?), you are somehow killing the process "from the outside" (i.e. from cmd.exe). I don't know the exact reasons why this happens.

As I've experienced similar problems in the past: try to hit q and Ctrl-C repeatedly in random order, if you're lucky you'll get a working prompt back again ;) [There's no better solution I know of – but it worked for me …]


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...