git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Soria Parra <sn_@gmx.net>
To: git@vger.kernel.org
Subject: [PATCH] Add --track option to git clone
Date: Mon, 30 Nov 2009 14:16:42 +0100	[thread overview]
Message-ID: <1259587004-14633-1-git-send-email-sn_@gmx.net> (raw)

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.

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.

I'm aware that it's not possible to give more than one --track option. Implementing
the possibility to specify multiple --track option would certainly a good improvment
later, but would also require a lot more work as far as I understand the clone code.

Being able to specify just one --track option is a compromise of doing a small change
and implementing this feature.

             reply	other threads:[~2009-11-30 13:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 13:16 David Soria Parra [this message]
2009-11-30 13:16 ` [PATCH 1/2] Teach clone to clone just one remote branch using --track David Soria Parra
2009-11-30 13:16 ` [PATCH 2/2] Documentation: Add --track option to the git clone manpage David Soria Parra
2009-11-30 13:36 ` [PATCH] Add --track option to git clone Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1259587004-14633-1-git-send-email-sn_@gmx.net \
    --to=sn_@gmx.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).