When using Git Bash, I type the command:
git log
It shows me all the logs. But now I want to do a second command. So I hold the down arrow to get to the bottom of the logs and it just says (END)
. How do I get to the next line so I can enter my next command?
You can press q to exit. git hist is using a pager tool so you can scroll up and down the results before returning to the console.
To exit from bash type exit and press ENTER . If your shell prompt is > you may have typed ' or " , to specify a string, as part of a shell command but have not typed another ' or " to close the string. To interrupt the current command press CTRL-C .
The git log command shows a list of all the commits made to a repository. You can see the hash of each Git commit , the message associated with each commit, and more metadata. This command is useful for displaying the history of a repository.
By default, Git commands that display a lot of information will show the information through a different program, called terminal pager. These programs basically show you the information in pages, so that you can see everything and not only the very last bit of information at the end.
The most known pagers include more
and less
.
Git for Windows comes bundled with less
and is configured to use that by default. Less gives you the ability to scroll up and down the output (using your arrow keys), so you can browse for as long as you want. In order to exist the program, you need to press the q key on your keyboard. This will put you back into bash.
You can change the paging behavior of Git by configuring the core.pager
configuration.
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