git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git branch --current?

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 17, 2010, 15:14 UTC
Message-ID
<76718491003170814v71e31e91q994daee849da4caf@mail.gmail.com>
In-Reply-To
<fcaeb9bf1003170804s4c9fdbb6id2c045bdb90f8c6f@mail.gmail.com>

On Wed, Mar 17, 2010 at 11:04 AM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:

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

How about naming something like this git-pwb and copying it to somewhere in PATH:

#!/bin/sh . /opt/git/share/git-core/git-completion.bash echo $(__git_ps1)

Perhaps you are inspired to contribute git-completion.csh?
:-)
j.
Previous: Nguyen Thai Ngoc DuyNext: David Aguilar
Message 4 of 6 in “git branch --current?”
  1. Nguyen Thai Ngoc DuyMar 17, 2010
  2. Jay SoffianMar 17, 2010
  3. Nguyen Thai Ngoc DuyMar 17, 2010
  4. Jay SoffianMar 17, 2010
  5. David AguilarMar 17, 2010
  6. Nguyen Thai Ngoc DuyMar 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.