Configure command line to see useful git information
2014 09 Apr

How to configure your command line to see useful git information in the prompt? And add colors, drush auto-completion and shortcuts too!

By Sumeet Pareek

Every developer configures ones machine in a manner that assists them in the development workflow, and loves to learn and share new and better ways to do things.

This blog is to share with some of the new members of Innoraft’s team, and anybody who lands here, bash configurations that help you customize your command line prompt in useful ways. In here you will find answers to the below questions.

  • How to add color to your command prompt?
  • How to see useful git information, like the current branch you are on and the status of your repository, on the command line?
  • How you setup and use drush shortcuts for drupal development?

Though these are really simple configurations they can add a lot of value to your development workflow, as shown in the video below. What I love most about these configurations is how they empower (almost nudge) you to use git branching and other features to the most.

Here is a screencast I put together to show you how it works.

A sample bash configuration file with the necessary configurations can be seen here - https://gist.github.com/sumeetpareek/9907382

You can learn more about each configuration change below

Go ahead and try them. I am sure you would love the ease of drupal development with such a setup. Do share awesome tricks you have to make you command line more useful :-)

Featured blog

web-personalization

Personalized Content is a Proven Entity !!

Irrespective of how big a business icon or brand you are, increasing the relevance of your website will always be critical to your success.

Read More

Git Hooks

Git hooks for better codes

We are programmers and we are always on the lookout for ways to improve our code. A good and structured way of coding defines the completeness of a programmer.

Read More

Drupal ,varnish cache

Hard time with Drupal, Varnish Cache and Cookies

Using a reverse proxy server in front of a web server is usually needed for every big site and it is a very good thing to do so as reverse proxy server will handle all the anonymous traff

Read More

Say no to captcha

Say no to captcha - Various Spam Protection Methods

Maintaining high traffic websites have their own merits and demerits, the most annoying thing about them is SPAM.

Read More