Information Technology Reference
In-Depth Information
and stores them in your .git/objects database. You don't have to define an alias
for remote repository if you don't want to. Git doesn't require it. Even without the ali-
ases for remotes defined, git is able to download to your repository the revisions from
any repository accessible by some URLs. There is no connection between your reposit-
ory and GitPad's repository on Github. The mapping between the remote branch master
(in GitPad's repository) and the remote tracking branch xyz/pqr (in your repository)
is set by refspec:
master:refs/remotes/xyz/pqr
The part before the colon is the name of the remote branch, the part after the colon
is the name of the remote tracking branch. By using the URL and a refspec, you can
fetch the arbitrary branch from any repository you wish.
Sometimes I'm asked why at one time we write origin master separated with a
space and at other time we use a / as a separator. As in:
$ git pull origin master
$ git rebase origin/master
In the first command origin is the name of the remote and master is the name
of the branch. This is an ordinary local branch or a local tracking branch.
In second command origin/master is the name of a remote tracking branch.
The syntax of the above commands can be described as:
$ git pull [remote] [branch]
$ git rebase [branch]
In the second command we use a remote tracking branch origin/master as a
[branch] parameter.
Search WWH ::




Custom Search