Subject: Re: [OT] Your branch is ahead of the tracked remote branch 'origin/master' by 50 commits.

From: Jakub Narebski <[email-masked]>
Date: Tue, 01 Jul 2008 05:47:36 -0700 (PDT)

SZEDER Gábor <[email-masked]> writes:

> how about displaying the current branch in the command prompt?
> 
> >From contrib/completion/git-completion.bash:
> 
>   #    4) Consider changing your PS1 to also show the current branch:
>   #        PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
>   #
>   #       The argument to __git_ps1 will be displayed only if you
>   #       are currently in a git repository.  The %s token will be
>   #       the name of the current branch.

Because I alos use StGit, I have added to my prompt visual
differentiation if the branch is under StGit control.

But I have my own git prompt function, based on git-completion.bash
but different.  It shows current branch (or "HEAD" if on detached
HEAD), current repository, and current working directory.  It laso has
number of command in history, the same as in my ordinary prompt.

-- 
Jakub Narebski
Poland
ShadeHawk on #git