4 ms·
snippet in my PS1 to get the current git branch: $(git branch | grep ^* | colrm 1 2) You could use $(git branch --show-current) but if the head is detac
by jedimastert 5y ago
snippet in my PS1 to get the current git branch:
$(git branch | grep ^* | colrm 1 2)
You could use
$(git branch --show-current)
but if the head is detached it won't show anything