Most Git repositories use master as the main (and default) branch - if you initialize a new Git repo through git init , it will have master extracted by default.
However, if you are cloning a repository, you have a default branch that the remote HEAD points to ( HEAD is actually a symbolic ref pointing to the name of the branch). So, if the cloned repository had a HEAD specified by, say, foo , then your clone will have a foo branch.
A remote user that has cloning can still have a master branch (you can check with git ls-remote origin master ), but you would not create a local version of this branch by default, because git clone only checks the remote HEAD .
Amber Sep 02 '10 at 4:10 2010-09-02 04:10
source share