Abra o bashrc no terminal e adicione as linhas a seguir;
function parse_git_dirty {
test "$(git diff HEAD --name-only 2>/dev/null 2>&1)" && echo " *"
}
function git_branch_name() {
git branch 2>/dev/null | grep -e '^*' | sed -E "s/^\* (.+)$/(\1$(parse_git_dirty))/"
}
function show_colored_git_branch_in_prompt() {
PS1="\[\033[01;34m\]\w\[\033[31m\]\$(git_branch_name)\[\033[m\]$ "
}
show_colored_git_branch_in_prompt
OBS:Em algumas verões do linux mint o caminho do bach é /etc/bash.bashrc