Linked Questions
19 questions linked to/from Git branch command behaves like 'less'
125 votes
1 answer
24k views
Git command output is in editor (vim) and not directly to terminal output [duplicate]
I don't know why but the output from some git command are in editor (vim) and not directly to the terminal output. For example, the command git branch open vim and list the branches but I would like ...
11 votes
1 answer
4k views
How to display output of `git branch` on-screen in same CLI terminal? [duplicate]
My apologies, but I am having trouble phrasing my question. I'm running on CLI (zsh if it matters), using git version 2.20.0 and on macOS (think I've encountered it on my Ubuntu system at home too). ...
0 votes
1 answer
714 views
macOS git branch displays branches in less [duplicate]
I'm running git version 2.16.1 under macOS High Sierra 10.13.3 and when I use git branch, the result is displayed through less. On the contrary, when I'm using git branch under Linux, the result is ...
0 votes
1 answer
1k views
VSCode - git branch opens Vim [duplicate]
I'm using Git inside the VSCode terminal and it works. However, if I run git branch it opens the Vim editor, so that I need to run :wq to come back to the terminal! Is this the normal behaviour or ...
0 votes
1 answer
192 views
Git list commands sometimes emulate a multi-page terminal, but I'd like output to always be dumped to stdout [duplicate]
I'm a little confused with the following behavior of git commands in the Windows Command prompt. This shows a result comparable to VIM (I think) with interactive list git branch -a Result is ...
0 votes
0 answers
184 views
How do I output git branch command result to standard out by default? [duplicate]
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 ...
-1 votes
1 answer
151 views
Strange output of git branch [duplicate]
I have really strange output of "git branch". I type git branch in terminal and instead of getting the output of all branches in the terminal, I get the output in some file with the name of ...
0 votes
1 answer
65 views
How can I configure which CLI command is used to render the result of "git branch"? [duplicate]
When I run git branch on certain machines, I get a simple list of branches using what seems like the result of running the cat command. However, especially on machines running ZSH, it seems like the ...
1827 votes
16 answers
2.1m views
How do I show my global Git configuration?
I'd like to show all configured Git sections. I only found git config --get core.editor, and I'd like to output everything that's configured globally, not only the configured default editor.
958 votes
21 answers
254k views
How do I prevent 'git diff' from using a pager?
Is there a command line switch to pass to git diff and other commands that use the less pager by default? I know these methods exist: git diff | cat... removes all syntax highlighting git config --...
360 votes
7 answers
109k views
How can I detect if my shell script is running through a pipe?
How do I detect from within a shell script if its standard output is being sent to a terminal or if it's piped to another process? The case in point: I'd like to add escape codes to colorize output, ...
128 votes
5 answers
86k views
git branch ~(END) on terminal?
To note, I'm on Oh-My-Zsh and git 2.17. Whenever I type in git branch, instead of showing me the branches of my git, it shows something like this: ~ ~ ~ ~ ~ (END) I can quit this by pressing 'q' on ...
32 votes
2 answers
5k views
make git branch show branches inline (version 2.17.1)
Before git version 2.17.1 (no more than 4 versions back), when you ran git branch you would get an inline list of branches and your terminal was ready for a new command. In version 2.17.1 you get a ...
11 votes
2 answers
3k views
git branch displays my branch names in a VIM window, instead of in my current iterm2 window
Not sure why this is happening. I use iterm2, and have .zshrc bash When I run git branch It displays my branches "in a new window" is there a way to fix this? My config: alias projects=&...