All blog posts tagged with git

ZSH Prompt to show git branch

February 15, 2008

After using git for a little bit I started tinkering with ZSH, to get the current branch in my prompt. What I ended up with is this:

Turns out it's pretty easy - somewhere in your .zshrc you need to put the following:

# get the name of the branch we are on
git_prompt_info() {
  ref=$(git-symbolic-…

Read more

Displaying 1 post