Information Technology Reference
In-Depth Information
Figure 10-13
.
Both shared-repo and sarahs-repo right after cloning
We are watching this situation from Sarah's perspective. Thus
sarahs-repo
is
branch, and remote tracking branch. Sarah's repository doesn't contain any ordinary
local branches. When Sarah clones the repository, the
$ git clone
command auto-
matically creates two local branches for her:
master
and
origin/master
. The
first is a local tracking branch; the second is a remote tracking branch. You can verify
this with the
$ git branch -a -vv
command. The output would contain two im-
portant lines:
* master 36c7205 [origin/master] a3
remotes/origin/master 36c7205 a3
The first line says that the
master
is a local tracking branch for
origin/mas-
ter
branch. The second line says that
origin/master
is a remote branch.
When Sarah commits with
$ git simple-commit b1 b2
she moves her
master
branch (i.e., local tracking branch) forward. The state of the branches after
$
git simple-commit b1 b2
is shown in
Figure 10-14
.