Information Technology Reference
In-Depth Information
bar . Right now, there is no remote repository; therefore all the branches are ordinary
local branches.
Hint Local tracking branches and remote tracking branches exist only in a reposit-
ory containing at least one remote section in a configuration file. It doesn't make sense
to talk about remote tracking branches and local tracking branches in an isolated repos-
itory.
5-3. Creating a clone-with-branches alias
Problem
You want to create an alias that will simplify the process of cloning a repository with
branches. You want to be able to clone a repository and copy its branches with a single
command:
$ git clone-with-branches URL directory
The first parameter—URL—should point to an existing repository (a URL or a local
path). The second parameter— directory —sets the name for the directory you
want the clone to be stored in. Here is how we should clone the repository from Recipe
5-1:
$ git clone-with-branches 05-01 05-03
and jQuery:
$ git clone-with-branches git@github.com :jquery/
jquery.git jquery-local-clone
Solution
Search WWH ::




Custom Search