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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SZEDER Gábor <szeder@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux