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

checkout @{-1} bug/oddity

From
Adeodato Simó <dato@net.com.org.es>
Date
Apr 19, 2009, 15:37 UTC
Message-ID
<20090419153740.GA12431@chistera.yi.org>
In case this is worth fixing:
  | % g co -b foo
  | Switched to a new branch 'foo'
  | 
  | % g co -
  | Switched to branch 'master'
  | 
  | % g co -b bar
  | Switched to a new branch 'bar'
  | 
  | % g co bar
  | Already on 'bar'
  | 
  | % g co -
  | Already on 'bar'

In my opinion the last command should switch to master, as in, switching to the current branch should not lose the @{-1} history.

Thanks,
-- 
- Are you sure we're good?
- Always.
        -- Rory and Lorelai
Next: Thomas Rast
Message 1 of 3 in “checkout @{-1} bug/oddity”
  1. Adeodato SimóApr 19, 2009
  2. Thomas RastApr 19, 2009
  3. Adeodato SimóApr 20, 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.