Showing current git branch on shell prompt

Filed under Development
Tagged as , , , ,

Found this useful piece of code to put into .bashrc, which shows the current branch when the current working directory is versioned by git.

2 Comments

  1. Ronksu says:

    Not bad, have to take this into use right away.

  2. Ronksu says:

    Not sure how many times I have copied this from here already, but every time I have to look up the \u@\h (user@host) format to the beginning of the line.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*