As mentioned in the title, how to turn off color and remove the time?
Because I need to copy the output to pbcopy
,
but the color mode will make the output contain special characters.
I’ve added the following to the ~/.gitconfig
file, in order to remove most of the color:
[color]
ui = false
branch = false
diff = false
interactive = false
status = false
log = false
(Note: I’m running git-bash
from MINGW64 on Windows 10.)
If you don't want to disable colors for all commands, you can at least disable it just for the current log command:
git log --stat --no-color
Regarding the time, what you see is not the usual log output. Check if you have defined any alias for git log
.
Note: as mentioned in "Copy Shell Output via the Command Line", an easy way to copy to pbcopy is to pipe to it:
pbcopy and clip. Using pbcopy within the shell, the output of an execution can automatically be added to the copy queue (or clipboard).
Piping pbcopy at the end of the command makes this magic possible.
git log --stat --no-color | pbcopy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With