How to display the Mercurial branch name to bash prompt

To have your current branch name in your bash prompt, just add this code into .bash_profile file from your home directory.


Ofcourse, after you edit .bash_profile, you must logout and login again to see the changes.

//later edit

If you want to have the same feature in the graphical terminal, you should add the code above in the .bashrc file.

//2nd later edit
You can find a good “how to” for git on LeaseWeb Labs.

Leave a Reply

Your email address will not be published. Required fields are marked *