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

Re: remote branch checkout issue, why its *(no branch)

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Nov 28, 2008, 23:24 UTC
Message-ID
<20081128232459.GA5956@atjola.homenet>
In-Reply-To
<m3k5anjxcd.fsf@localhost.localdomain>
On 2008.11.28 14:32:56 -0800, Jakub Narebski wrote:
> What you can do is to create _local_ branch, closely tied to
> remote-tracking branch 'origin/B1', by using:
> 
>   $ git branch -b B1 --track origin/B1
You mixed up checkout and branch there ;-)
It's either
git branch B1 origin/B1 # Just create a branch B1
or
git checkout -b B1 origin/B1 # Create and checkout B1

I omitted the "--track" as, by default, it is implied when you create a new branch from a remote tracking branch.

Björn
Previous: Jakub Narebski
Message 3 of 3 in “remote branch checkout issue, why its *(no branch)”
  1. Sudipta GHOSHNov 28, 2008
  2. Jakub NarebskiNov 28, 2008
  3. Björn SteinbrinkNov 28, 2008

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.