How to show git status and conda environment in command prompt?
You can just configure your PS1 to show the git branch by adding a function right above your PS1 declaration:
git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
Then, you simply place \$(git_branch)
wherever you'd like in your PS1, and colorize it as usual.
If you need more details, this blog shows you how.