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

Re: [ANNOUNCE] GIT 1.6.2-rc1

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 16, 2009, 17:02 UTC
Message-ID
<76718490902160902q50c0d730j4f18664455626b93@mail.gmail.com>
In-Reply-To
<7v8wo6bvn9.fsf@gitster.siamese.dyndns.org>
On Mon, Feb 16, 2009 at 4:04 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> * @{-1} is a way to refer to the last branch you were on.  This is
>  accepted not only where an object name is expected, but anywhere
>  a branch name is expected and acts as if you typed the branch name.
>  E.g. "git branch --track mybranch @{-1}", "git merge @{-1}", and
>  "git rev-parse --symbolic-full-name @{-1}" would work as expected.

I always find explicit examples clearer, especially since you really have no idea what the reader expects. Some folks just have unreasonable expectations. :-)

So,
 master> git checkout next
   next> git branch --track mybranch @{-1}
Creates "mybranch" from master, *not from next*, correct?

Also, the "--track" option is an unnecessary distraction to the example, isn't it?

j.
Previous: Matt KraaiNext: Junio C Hamano
Message 3 of 4 in “[ANNOUNCE] GIT 1.6.2-rc1”
  1. Junio C HamanoFeb 16, 2009
  2. Matt KraaiFeb 16, 2009
  3. Jay SoffianFeb 16, 2009
  4. Junio C HamanoFeb 16, 2009

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.