Correct paging and coloured output using Git for Windows via Cygwin -


title says all: possible git windows pipe output through cygwin's less shows correctly in mintty window? there have been number of questions asked this, still no definitive answer.

arguably kind of setup little esoteric, but
- need cygwin because i'm using build system requires it;
- don't want use git client comes cygwin because order of magnitude slower when applying patches or rebasing, need do;
- aware manually typing git show <whatever> --color=always | less -r works, i'm finding hard believe working solution set aliases every git command want paged , coloured output from.

it turned out surprisingly easy:
git config --global core.pager 'c:/cygwin/bin/less.exe'
or
git config --global core.pager 'c:\\cygwin\\bin\\less.exe'
both trick. (with path adjusted wherever installation of cygwin lies.) didn't find @ first because of need double backslashes within quote; forward slashes work fine too.


Comments