I\'m using git for-each-ref
as a git alias to display a branch name and the subject of the last commit on that branch. That said, it\'s hard to tell where the branc
I don't see anything in the for-each-ref
man page that suggests it supports backslash-escape sequences like \033
. If you replace \033
(and \e
) with a literal escape character, it seems to work just fine.
Cupcake says that for-each-ref
also supports %xx
hex escape sequences, which would look like:
[alias]
logbranch = "for-each-ref --sort=-committerdate refs/heads/ --format='[%1B[0;31m]%(refname:short)[%1B[m] %(subject)' "
This also works fine on my system.