Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git command output is in editor (vim) and not directly to terminal output [duplicate]

Tags:

git

vim

I don't know why but the output from some git command are in editor (vim) and not directly to the terminal output.

By example, the command git branch open vim and list the branches but I would like that the output are directly in the terminal.

I didn't set vim as default editor on the git config.

My config is Ubuntu 18.04 and zsh with oh-my-zsh plugin.

Thanks in advance for your replies

like image 404
Yan Vh Avatar asked May 25 '18 08:05

Yan Vh


People also ask

How do I change the default git editor?

The command to do this is git config --global core. editor "nano" . You can change the highlighted section with your editor of choice!

What is Vim command in git?

Vim is a very useful and helpful editor for creating and editing different types of files more efficiently. Many new features are added in this editor that makes it a powerful editor. Many plugins are developed by many coders for this editor to increase and configure its core functionalities.

How do I exit git diff command?

Use ONLY q+enter to exit. It's possible to break out by repeatedly typing q+enter+q+enter+q+enter until the end of time no matter what the console shows.


1 Answers

Reply to myself.

It is a default behavior change introduced in git 2.16.

With git --no-pager branch or git config --global pager.branch false it's ok

like image 172
Yan Vh Avatar answered Sep 19 '22 06:09

Yan Vh