Description
Today, the Git branch/context is not shown in Gitpod's Terminal prompt.
But maybe it could be nice to have it included (this seems to be a common pattern, and Git even comes standard with the dedicated helper __git_ps1
).
Current prompt
Proposed new prompt
This can be achieved like so:
PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " (%s)") $ '
Criticism
I believe we've previously decided against having this, because the current branch name is already displayed in the bottom left of the IDE:
However, I personally find it hard to spot, and sometimes still accidentally push to the wrong place because I don't know I'm on the wrong branch.