The current version is 2.0.0.
A brief article about it has been published in Hacker Noon: https://hackernoon.com/why-linux-developers-should-use-gitprompt-8d654e5b87e1
To install gitprompt, first cd
to a suitable directory where you want to
install it. Let's say you want to install it in your home directory, so
just type:
$ cd
$ git clone https://www.github.com/enfors/gitprompt
To run it, run the following commands in your Bash prompt:
$ cd gitprompt
$ . gitprompt.sh
If you want it all the time, add the following to your .profile or .bashrc:
. ~/gitprompt/gitprompt.sh
Happy Hacking!
GitPrompt
has a small but growing number of features
The main feature of GitPrompt
is, as the name implies, to display
git status (if files have been modified since the last commit, etc) in
the prompt.
If a command failes with a non-zero exit status, this status will be displayed in the prompt, reducing the risk that the user will miss it.
Every time you press enter, the current time on the machine will be displayed in the prompt.
If you use many different accounts on many different machines, it is useful to always have the current username and hostname displayed in the prompt.
If you have a lot of different machines with less-than-helpful
hostnames, which is sometimes the case, then you can set a shell
variable called HOSTALIAS
, to a more descriptive name, and it too
will be displayed in the prompt.
You can customize the colors used with the GPConfig
command. If things
go wrong, you can reset the config with GPReset
.