git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git branch --current?
Date: Wed, 17 Mar 2010 22:04:50 +0700	[thread overview]
Message-ID: <fcaeb9bf1003170804s4c9fdbb6id2c045bdb90f8c6f@mail.gmail.com> (raw)
In-Reply-To: <76718491003170748h349c5ed0u7649864cc824f549@mail.gmail.com>

On 3/17/10, Jay Soffian <jaysoffian@gmail.com> wrote:
> On Wed, Mar 17, 2010 at 10:43 AM, Nguyen Thai Ngoc Duy
>  <pclouds@gmail.com> wrote:
>  > I use "git branch" when I need to know the current branch. But I have
>  > many branches, looking for the star is "time consuming". I'd rather
>  > have something like pwd, just print the current branch name and that's
>  > all. A bit more information about current branch wouldn't hurt, as
>  > long as the branch name is printed at a fixed location.
>  >
>  > What command do you use to know what branch you are on?
>
>
> Doesn't everyone who's anyone put it in their prompt with the bash
>  completion script? :-)

Me obviously :-) But bash is not the one true shell. I need to use csh
sometimes.

>  Well, if not, how about a simple alias:
>
>  pwb = rev-parse --abbrev-ref HEAD

Hmm.. I have alias.pwb = symbolic-ref HEAD. Both solutions are not as
good as "git branch", say detached HEAD case.
-- 
Duy

  reply	other threads:[~2010-03-17 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 14:43 git branch --current? Nguyen Thai Ngoc Duy
2010-03-17 14:48 ` Jay Soffian
2010-03-17 15:04   ` Nguyen Thai Ngoc Duy [this message]
2010-03-17 15:14     ` Jay Soffian
2010-03-17 19:06       ` David Aguilar
2010-03-18  2:00         ` Nguyen Thai Ngoc Duy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fcaeb9bf1003170804s4c9fdbb6id2c045bdb90f8c6f@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jaysoffian@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).