When to press git log command to see all the commits made, I get to see -->
commit: bla bla
Author: bla bla
Date: bla bla
:
it's ok to see this information but after last : I can't type anything. If I try to type anything I get to see (END) with a error sound nothing else. I can't use git any more I have to force exit console and restart everything to again use git. What am I supposed to type after : so I get out of it ?
The : you see is the command prompt for the pager that is loaded to read the log. It is most likely less; which is the default that git uses. To exit the prompt type q
You can configure this setting with core.pager property.
For example, if you set it to be blank:
git config --global core.pager ""
Then you will see all the log messages at once, without any pagination; that is, without the : prompt. However, you may want to keep it as is, and instead learn these useful shortcuts:
g: go top of the file
G: go bottom of the file
/: search forward
?: search backward
N: show line number
: goto line
F: similar to tail -f, stop with ctrl+c
S: split lines
There is a lot more information at the man page for less.
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