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

intor_react

Introduction to React JS and Components

React is a flexible JavaScript library for building user interfaces and it lets you compose complex UIs from small and isolated pieces of codes which is known as Components.

Read More

Flexbox

How to simplify the layout of your website using Flexbox?

Have you ever scratched your head while working with CSS to make some simple layouts for your website? Are you fed up of running to the UI developers for small layout designs every time?

Read More

cache_context

Drupal 8 Cache Context: An efficient way for context based caching.

We are well aware of the fact that Drupal Cache API is a remarkable feature introduced in Drupal 8.

Read More

CacheImg

How does entity cache work in Drupal 8

The Drupal Cache API is used to store data that takes a long time to compute.

Read More