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

Re: master and origin

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 29, 2006, 21:01 UTC
Message-ID
<ei34qd$emn$1@sea.gmane.org>
In-Reply-To
<4d8e3fd30610291253s2d8000dfx942e0fa20e0057f6@mail.gmail.com>
Paolo Ciarrocchi wrote:
Show 11 quoted lines
> I went trough the docs I found on the web but I still don't fully
> understand why if I clone a remote repository my local copy has two
> branches, origin (that is always a exact copy of the remote
> repository) and master which is... what? The branch supposed to be
> used for local development?
> 
> I'm used to just checkout to a new branch, do my own development and
> then diff against origin so I'm missing why I see the master branch.
> 
> I'm sure I'm missing something very fundamental but I cannot figure
> out what is it :-)

Nothing very fundamental. The 'master' branch is (as name indicates) default branch on which you do your own development. The 'origin' branch is used to track 'master' branch in the repository you cloned from. If you don't do your development on 'master', but use other branches, the 'master'/'origin' is unnecessary; you could fetch 'master' into 'master'...

By the way, if you clone with --use-separate-remote you would get separate namespace for tracking branches; additionally they would be treated read-only (can't commit to).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Paolo CiarrocchiNext: Luben Tuikov
Message 2 of 7 in “master and origin”
  1. Paolo CiarrocchiOct 29, 2006
  2. Jakub NarebskiOct 29, 2006
  3. Luben TuikovOct 29, 2006
  4. Jakub NarebskiOct 29, 2006
  5. Paolo CiarrocchiOct 29, 2006
  6. Jakub NarebskiOct 29, 2006
  7. Luben TuikovOct 29, 2006

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.