Git命令输出在编辑器(vim)中,而不直接在终端输出中 [英] Git command output is in editor (vim) and not directly to terminal output

查看:119
本文介绍了Git命令输出在编辑器(vim)中,而不直接在终端输出中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道为什么,但是一些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.

例如,命令git branch打开vim并列出分支,但我希望输出直接在终端中.

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

我没有在git config上将vim设置为默认编辑器.

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

我的配置是Ubuntu 18.04和带有oh-my-zsh插件的zsh.

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

提前感谢您的回复

推荐答案

回复自己.

这是git 2.16中引入的默认行为更改.

It is a default behavior change introduced in git 2.16.

使用git --no-pager branchgit config --global pager.branch false没关系

这篇关于Git命令输出在编辑器(vim)中,而不直接在终端输出中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆