How to colorize the branch name (shown in bold below) in the output of git checkout
?
(base) dollaween $ git checkout develop Switched to branch
Color settings for different commands are controlled by the config variables
color.<command>.<slot>
You can see all available config variables with the command git help -c
(see git config: list all variables and their default values ). If there is no variable called color.checkout.…
then I think this is not possible.
The closest replacement I could think of would be to colorize the branch name in the output of git status
.
For example:
$ git config color.status.branch red $ git status On branch Your branch is up to date with 'origin/master'. […]
The bold part would now be red.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.