4 ms·
IIRC if you pipe the output to, e.g, xclip, or redirect to a file it will give the original diff format. Not as convenient, but still workable.
by JadedBlueEyes 2y ago
IIRC if you pipe the output to, e.g, xclip, or redirect to a file it will give the original diff format. Not as convenient, but still workable.
- leonheld 2y agoI... did not know that! Yep yep that should do the trick for me. Thanks a lot, actually!
- mplanchard 2y agoMost tools that do formatted output, if they’re well-behaved, should try to detect if their output is a pipe and if so, disable formatting. Some examples that I can think of off the top of my head (in addition to git) are ripgrep and jq, both of which do the right thing and strip formatting.
- knome 2y agorather they should detect that output is a terminal and enable the coloring
- pca006132 2y agoWow I never knew this, I always just type `--no-ext-diff` when piping the output. Thanks!
- ramses0 2y ago`... | cat` is sometimes really handy (and universal)
- lucasoshiro 2y agoI use git -c core.pager = less, but piping seems to be a less verbose option... hmmm I'll try it
- rusk 2y agoPipe through cat should work