Skip to content
A bash prompt with git info πŸ•
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


prompt format:

09:36 tkling [awesome-branch] git-prompt => 

The branch info (part in square brackets) is colored - red for 'dirty', green for 'clean'.

Copy pasta this script, or be sensible and source it, into your user bash profile (usually ~/.profile or ~/.bash_profile), reload your terminal, and look at your git info!

Only shows git info if you're in a git repo.

Requires a version of git with the symbolic-ref command => at least

Special thanks to @jusroberts for cleaning up the script and making colors work!

You can’t perform that action at this time.