Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

I'm trying to learn Git with the help of Git Immersion. There's one thing that frustrates me whenever I use git log or git diff:

Git log shows (END) marker

I can't figure out what to do next when I encounter this END word. I can't type any commands and I end up closing the current bash and open another. How do I type in the next command that I want to use?

2 Answers

0 votes
by (50.2k points)

As the question shows that you are in a scrollable output of git log. To exit this you can use:

:q for exit;

:h for help;

Note: if you don’t want to read the output in pager you can use an ENV variable GIT_PAGER to cat or you need to set core.pager to cat.  

Hope this will help you to exit the git log.

0 votes
by (1.3k points)

When you see the (END) marker in Git, it indicates you're in a pager, usually less, for viewing long outputs. Here are some navigation tips:

Scroll Down: Use the arrow keys or the space bar to advance one page.

Scroll Up: Hit b to go back one page.

Search: Type / followed by your search term to find text.

While using it, you can use the q command to quit back into the command line. You can now now run your git status or git diff without reopening your terminal; this makes handling long outputs a lot easier.

Related questions

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...