Cjku/git/remote
From MozillaWiki
< Cjku/git
clone
$ git clone -h usage: git clone [options] [--] <repo> [<dir>] -o, --origin <name> use <name> instead of 'origin' to track upstream
The git-clone command creates a new git repository based on the original you specify. The branches under refs/heads namespace in original repository become branches under refs/remote/heads namespace in the new created repository. If you do not specify origin in git-clone operation, git use "ref/remote/heads/origin" as default namespace to keep remote-tracking branches. There is no special-power for "origin", it just a default choice.
Here are roles when we play around with remote:
- Remote repository: the repository you cloned from.
- Remote: short name of URL, or, alias name of URL
- Local/current repository: new repository, create in git-clone procedure, at local side
- Remote-tracking branches: branches which are associated with a remote. A proxy/ mirror branch of peer branch on the remote.
- A local-tracking branch: a branch that is paired with a remote-tracking branch. It is a form of integration branch that collects both the changes from your local development and the changes from the remote-tracking branch.
- A topic/ development branch: A local branch which is checkout from a local-tracking branch. A development branch is where we construct feature or fix bugs.
- A remote branch: a branch located in remote repository.
git-fetch and git-push
TDB: config
TBD: refspec