0

How do I get the command git branch to display its output to standard output directly instead of displaying it in a less editor?

I want to be able to do this

$ git branch * develop master 

Instead of typing the command (1) and see the output in a less editor (2):

(1)

$ git branch 

(2)

* develop master (END) 

I don't want to type git branch | cat every time.

4
  • 4
    Does this answer your question? Git branch command behaves like 'less' Commented Mar 10, 2020 at 23:45
  • Create an alias that uses cat Commented Mar 10, 2020 at 23:51
  • 2
    Technically, less is a pager, rather than an editor, but: git --no-pager, or set environment variable GIT_PAGER, or configure core.pager, or configure pager.branch to false, etc. (Note that the default behavior used to be the equivalent of having pager.branch set to false, so that's the accepted answer in the linked duplicate.) Commented Mar 10, 2020 at 23:51
  • Can't find the linked answer when I'm about to post this question, got what I want, thanks for the comments! Commented Mar 11, 2020 at 0:52

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.