Everybody who knows me knows I hate to run in circles. Suffering from a repetition syndrome is what awaits everyone who’s ignoring those nifty tricks that make their lives more convenient.

Over the course of years, I’ve met many people that use GIT too frequently to not have their setup include the convenience of a GIT prompt for their shell. To put things in perspective, this includes system administrators, but also software developers. Amazing, really. Astonishing, frankly.

Rather than convincing people individually through show-and-tell, and walking those people using the holding-hands-spelling-it-out “teaching” mechanism, and partly also because I promised in Part I of A Flask Mega-Tutorial, here’s how I set up mine.

Some might call it boring, but I’m a bash shell user, so you’ll need some or the other software package for bash completion, which in the world’s best distribution is called bash-completion.

In your ~/.bashrc, include the following snippet somewhere near the end (note this modifies your prompt only minimally compared to the default, and does precisely that on purpose):

Reload your ~/.bashrc by typing:

$ . ~/.bashrc

Yes, WordPress’s and/or this theme’s markup for preformatted text is the worst.

Now, here’s what I figured we would do:

Create a GIT repository some place:Your prompt now shows a # character to indicate there’s a GIT repository, but nothing’s there yet.