Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I go to the next command in Git Bash after using git log?

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?

like image 348
Augs Avatar asked Mar 05 '16 22:03

Augs


People also ask

How do I jump out of git log?

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.

How do I escape git bash?

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 .

What happens when you execute git log command?

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.


1 Answers

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.

like image 80
poke Avatar answered Oct 16 '22 03:10

poke