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 :-)

Latest Blogs

Chrome

Chrome to call out websites that are ‘too slow’

There’s little that can test your patience like a slow-loading website. Google gets that, and they’ve now got your back.

Read More

Significant UI

6 Significant Reasons to Invest in UX Design

In the digital world, we live in today building a digital presence has become important for organizations of all kinds.

Read More

Drupal 9

Getting ready for Drupal 9: what should website owners do?

Drupal 9 will release on 3rd June 2020, which means it will be the end of announcements for Drupal 7 and Drupal 8. Drupal 9 will not be much of a change from Drupal 8.

Read More

Security

Tips to Secure your Drupal Website with Ease: Basic Security checklist

If someone were to break in your room, they would probably learn less about you than if they hacked you on the internet.

Read More