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

Re: [PATCH] builtin/checkout.c: show usage with options on missing argument 'branch'

From
Junio C Hamano <gitster@pobox.com>
Date
May 5, 2011, 19:49 UTC
Message-ID
<7vwri553nv.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTikMu3fjbALTAwaaknskBw0H7LbZ-g@mail.gmail.com>
Ralf Thielow <ralf.thielow@googlemail.com> writes:
> Simple "git checkout" or "git checkout " don't tell me that i've done a mistake
> on usage. It does nothing.
That is a designed behaviour.  You did nothing wrong.

Besides, that is a way people who use "checkout -t -b" to create topic branches check their branch status. Pay attention to what the last command does in the following transcript.

    $ git checkout master
    $ git checkout -t -b side
    Branch side set up to track local branch master.
    Switched to a new branch 'side'
    $ git checkout master
    Switched to branch 'master'
    $ edit ; git commit ;# on 'master'
    $ git checkout side
    Switched to branch 'side'
    Your branch is behind 'master' by 1 commit, ...
    ... time passes ...
    $ git checkout
    Your branch is behind 'master' by 1 commit, ...
   
Previous: Ralf Thielow
Message 4 of 4 in “builtin/checkout.c: show usage with options on missing argument 'branch'”
  1. builtin/checkout.c: show usage with options on missing argument 'branch'Ralf Thielow, May 5, 2011
  2. Junio C HamanoMay 5, 2011
  3. Ralf ThielowMay 5, 2011
  4. Junio C HamanoMay 5, 2011

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.