From: Avery Pennarun <apenwarr@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Quick way to clone exactly one branch
Date: Wed, 20 May 2009 16:45:44 -0400 [thread overview]
Message-ID: <32541b130905201345h6daa84e8hb937e1e46456b3c5@mail.gmail.com> (raw)
Hi all,
Is there a quick alternative to the following?
mkdir myproj
cd myproj
git init
git fetch git://whatever master
git checkout -b master FETCH_HEAD
Basically, the above is a lot like 'git clone' but only clones the
'master' branch. For really big projects with lots of junk in other
branches, the above can save a lot of bandwidth.
Also, if I were using git clone, I would often use --reference above.
I'm kind of afraid of explaining to a newbie that they should add an
entry to .git/objects/info/alternates after step 3.
Am I missing something obvious?
Have fun,
Avery
next reply other threads:[~2009-05-20 20:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 20:45 Avery Pennarun [this message]
2009-05-28 20:15 ` Quick way to clone exactly one branch Jeff King
2009-05-28 20:26 ` Jakub Narebski
2009-05-28 20:32 ` Jeff King
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=32541b130905201345h6daa84e8hb937e1e46456b3c5@mail.gmail.com \
--to=apenwarr@gmail.com \
--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).