Git Branch Information and Status on Linux Command Prompt

DevOps Random

When working with Git repositories on the Linux command line, it can often be helpful to see the branch on which you are using at the command prompt, rather than having to identify the branch via a command like “git branch”.

To install it just run:

curl -sS | bash

Then logout and back in again to reload your bash configuration.

So if you cd into a directory that is git initialised, you’ll see the branch currently selected at the command prompt.

There’s loads more you can do fancy-git but that’s for another time!

Leave a Reply

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