Re: master and origin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paolo Ciarrocchi wrote:

> 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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]