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

Re: git clone operation

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Aug 17, 2008, 19:38 UTC
Message-ID
<20080817193833.GA29469@atjola.homenet>
In-Reply-To
<m3wsifsawl.fsf@localhost.localdomain>
On 2008.08.17 12:23:57 -0700, Jakub Narebski wrote:
Show 15 quoted lines
> Mike Gant <mwgant@gmail.com> writes:
> > I realize that I can create a new local branch that is based off the
> > desired branch:
> > 
> > $ git-checkout -b master origin/master
> > 
> > Is this the accepted method for obtaining the desired branch?
> 
> You can use (with new anough Git)
> 
>   $ git checkout --track -b master origin/master
> 
> to setup repository in such way that "git pull" on 'master'
> would know that it is meant to fetch from 'origin' and merge
> 'origin/master'.

branch.autosetupmerge is set to true by default, so for remote branches --track is the default anyway (since 1.5.5 IIRC). So only an old enough git would actually require --track, unless you changed the config ;-)

Björn
Previous: Jakub NarebskiNext: Mike Gant
Message 3 of 5 in “git clone operation”
  1. Mike GantAug 17, 2008
  2. Jakub NarebskiAug 17, 2008
  3. Björn SteinbrinkAug 17, 2008
  4. Mike GantAug 20, 2008
  5. Mike GantAug 20, 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.