Re: [PATCH v2] Add --track option to git clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue,  1 Dec 2009 23:51:03 +0100
David Soria Parra <sn_@xxxxxxx> wrote:

> The following series adds a --track option to git clone. If the --track option
> is specified only the given remote branch will be received and checked out.

IMHO, the term "track" is already overloaded in Git and this doesn't help make
things clearer.

> It tries to make the following usecase possible:
> Imagine you are working on a project that has 1.x and a 2.x branch. The project
> itself requires a complex setup (webserver, configuration files, etc). Setting up
> 1.x and 2.x branch requires a lot of work, but a developer needs to maintain both.
> He'll use the --track option to clone the 2.x branch into a directory and does the same
> with the 1.x branch, where he setup the project. He can use locally separate repositories
> while still being able to push to just one remote repository.

This is already straightforward in Git without the limitation of tracking only
a single remote branch.   What is the necessity of doing this via the clone command?

  $ git init myrepo
  $ cd myrepo
  $ git remote add -t branch1.x -f origin <URL>
  $ git checkout -t origin/branch1.x

Sean
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]