Make a color decision

parse_git_branch() stopped working after Xcode 6.0.1 update [FIX]

I got a little surprise after I updated Xcode and the Command Line Tools this morning: the bash prompts in my shell had stopped displaying the current git branch. Eeek!

For those of you who aren’t familiar with parse_git_branch(), it’s a small bash script that simply highlights the current git branch at the end of the bash prompt. It lives in your ~/.bash_profile or ~/.bashrc file.

When it’s working, it looks something like this:

$ (master) (where (master) is the current git branch)

Some people use tools like zsh or liquidprompt to accomplish the same effect, but I use this little bash function because I don’t need all that extra stuff.

I poked around the web for a while this morning and couldn’t find any solutions.

Turns out, it’s a simple fix:

Open Xcode

Click to Agree to the new terms

Install the remaining components

Reload your shell of choice

Hope that helps somebody.

If you’re interested in using parse_git_branch() yourself, you can simply put the following into your ~/.bash_profile or ~/.bashrc file: