When working with a git repository you need to know which branch you are committing to. To do that you type git status and check for the info. Sometimes you just need to know the branch in order not to make mistakes when merging. It is super useful to have branch name as part of the command prompt.
Jim Myhrberg created a repository on GitHub with code and instructions on how to achieve this: https://github.com/jimeh/git-aware-prompt
Instructions for installation are pretty simple and work quite well out of the box.
There are a lot of forks of this repository. Specially interesting is this one by Paul “Joey” Clark: https://github.com/joeytwiddle/git-aware-prompt
git status
is taking too long to retrieve the dirty and staged stats.In the end, you are left with branch name in your prompt:
Or, like this if you used joeytwiddle’s repository:
SonataAdminBundle has a powerful extensions feature which allows you to add or change features of…
I used to spend a lot of time with my grandparents in my childhood. My…
If anything is certain in this world, it is that things always change. And there…
This is the most important advice on how to be successful! Read it carefully!
WordPress has a nasty habit of storing absolute URLs in the database. That means that…
In August 2014 Google announced that their search engine will value HTTPS as a ranking…