Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Show to different editor

Tags:

git

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.

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

like image 931
bytedev Avatar asked Dec 02 '11 16:12

bytedev


1 Answers

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

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.

like image 127
meagar Avatar answered Sep 19 '22 06:09

meagar