Add Your Current Git Branch to Your Command Prompt

If you work on multiple Git branches throughout your workday, you probably  find yourslef constantly git branch‘ing more than you’d like.

Instead, why not add your current Git branch to your command prompt?

Just add this to your ~/.bashrc file:

That creates a command prompt that looks like this:

jeff@lookitdev Resources dev-MEM59 :

That’s your username at your current hostname, your current folder, and your current Git branch.

 
 
 

Leave a Reply