Git显示给不同的编辑器 [英] Git Show to different editor

查看:122
本文介绍了Git显示给不同的编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让git show命令将文件的内容发送到不同的编辑器(例如Notepad ++),而不是默认视图。

I want the git show command to send the contents of the file to a different editor (e.g. Notepad++) instead of the default view.

我假设可以通过改变git配置,但我不知道在哪里。

I'm presuming this is possible by changing the git config but I'm not sure where.

推荐答案

Git不调用 / em>当你 git show 时,它会调用你的 pager ,这两个服务完全不同的目的。

Git is not invoking an editor when you git show something, it is invoking your pager, and the two serve completely different purposes.

您之后的设置是 core.pager ,您可以使用 git config --global core .pager<您的编辑器> ,但如果您的编辑器无法配置为从stdin读取,它将无法帮助您。

The setting you're after is core.pager, and you can configure it with git config --global core.pager <your editor here>, but it won't help if your editor can't be configured to read from stdin.

这篇关于Git显示给不同的编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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