Robin Siebler posted earlier about getting the git branch into the prompt, but that thread appears to have been deleted. This is what I do:
That prints the PWD inside brackets, followed by the current branch, followed by the tag this branch is based on. The prompt is colorized to be White on Green for local drives and White on Red for network drives.
Code:
FUNCTION gitbranch=`%@execstr[set _gb=%@execstr[git rev-parse --abbrev-ref HEAD 2>nul] & if %[_gb]. != . echo. %_gb (%@execstr[git describe --always]) & unset _gb]`
PROMPT=$e[37;%@if[%@remote[%_disk] eq 0,42,41];1m[$P]$e[22;40;36m%@gitbranch[]$e[22;40;33;1m$_$$$s
That prints the PWD inside brackets, followed by the current branch, followed by the tag this branch is based on. The prompt is colorized to be White on Green for local drives and White on Red for network drives.