How to get out of git listing?

Asked

Viewed 1,222 times

5

I have a project downloaded from the Github repository.

When I execute the command git log within that project, it lists all the branches existing in the project, but I can’t leave the list.

I’ve tried everything, I’ve done it ESC on keyboard, I’ve tried Ctrl+C, but these alternatives don’t work, someone would have a suggestion?

inserir a descrição da imagem aqui

  • 6

    Press q to get out.

  • @Andersoncarloswoss thank you very much worked, put as a response to I mark as a response.

2 answers

8


Welcome to less! A Unix pager that does more than more.

You can do a lot of interesting things with the less, how to search for a regular expression with /. But if your interest is just getting off the show, just one q.

This is the same pager you see when you consult man of some program, such as man less.


Details extracted from the comments

As well remembered by @Woss, it is possible to configure your pager. And this configuration can be done by repository (not just global).

According to documentation that the @hkotsubo dug, just set the property core.pager to make the configuration. Read the official documentation.

As mood note of programmers:

You can set it [core.pager] to more or to your Favorite pager (by default, it’s less)

In free translation (translating even the name of the programs):

You can configure it [core.pager] for plus or to your favorite pager (by default, it is least)

  • 2

    Jefferson, does he always use Less or is it configurable? I was researching it before answering.

  • @Andersoncarloswoss is configurable, stays in the .git/config in my memory. But unfortunately I lost the international OS link that talked about it...

  • 2

    @Andersoncarloswoss It is configurable, just set the core.pager in the .git/config: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_code_core_pager_code

  • 1

    @hkotsubo, loved the wordplay in the documentation: "You can set it to more or to your Favorite pager (by default, it’s less)"

  • 2

    @Jeffersonquesado So it is. The simple fact of less be an "evolution" of more already shows how programmers have a peculiar sense of humor :-)

0

Hello!

CTRL+Z

It can solve your problem. This command suspends the processes in question, to end them you can just type q

  • 5

    Ctrl+z suspends the process, but does not finish it. I believe that creating and maintaining multiple suspended processes will not be desired.

  • @Andersoncarloswoss Ita, I didn’t know it! Thanks Anderson, the tip is, will I delete this answer?

  • You can edit and correct the information, making it clear that. Probably doing this will reverse the votes in the reply.

  • @Andersoncarloswoss I corrected even not to pass misinformation, thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.