I am using Git Shell (the module for PowerShell) on Windows. It's the one that got installed when I installed Git for Windows. When I run a command that results in a lot of text such as git log
I get a page of results and then a ":" at the bottom of the screen. I guess it's a continuation prompt because I press ENTER and get another screen of data. I can't usually recover to a normal prompt after this happens though. I get the text (END)
at the bottom of the shell and it looks like it's masking the first few characters of whatever command I try to type and it even seems to act a little sporadic. I can't seem to figure it out. Any ideas?
The "common" recommendation for command-line git on Windows is to use the "git-bash" shell. However, git works nicely from the Windows PowerShell with one small addition...
We can do this by either executing the command Add-PoshGitToProfile or by editing your PowerShell profile script and adding the command Import-Module posh-git . If you want posh-git to be available in all your PowerShell hosts (console, ISE, etc) then execute Add-PoshGitToProfile -AllHosts .
Git uses pager when you run git diff , git show , git grep etc. If you want to see the result without pager, just add --no-pager or -P .
To exit git log, type “q” or “z”. Or type “h” to seek for help.
Several of the git commands use a pager to allow you to view one screen full of information at a time. The one that come with git is usually less
(more info). You can visit the link for common commands, but as you've found the most important is q
to quit to get back to the command prompt. The next most useful one I've found is space to move to the next screen full.
You can change the pager used if you like in the git config file's core.pager
field.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With