Most of the developers use git as version control and want to know the current working branch. In case of Windows, if you are using Gitbash, you can see the branches and status in it without any configuration but if you are on Ubuntu based systems, you need to configure it yourself.
Here is what you need to do. In terminal open .bashrc
file in text editor i.e. vim vim ~/.bashrch
and add the following line at the bottom.
export PS1='[\033[32m]\u@\h[\033[00m]:[\033[34m]\w[\033[31m]$(__git_ps1)[\033[00m]\$ '
If you want also to show the other states, add the following two lines before the above line:
export GIT_PS1_SHOWDIRTYSTATE=true export GIT_PS1_SHOWUNTRACKEDFILES=true

Then save the file and exit. Now reload the file by hitting the command:
:wq! source ~/.bashrc