* [RFC] Not grabbing ALL branches and tags with git clone
@ 2005-11-14 18:26 Carl Baldwin
2005-11-14 21:01 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Carl Baldwin @ 2005-11-14 18:26 UTC (permalink / raw)
To: git
Greetings,
Lately, I've found that 'git clone' gives me more than what I want.
Especially when there are a lot of branches and tags in the remote
repository.
I have found myself doing something like the following in most cases.
% mkdir work && cd work
% git init-db
% git fetch <url> <refspec>
% git checkout -f -b master <branch>
Usually, I will use a file in .git/remotes but you get the idea. I was
thinking that it might make sense to make git clone able to do this.
Change the usage of git clone so that it looks like this:
git clone [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo> <dir> [<refspec>] ...
git clone would behave exactly the same way if no refspec were given but
if a refspec (or multiple refspecs) were given on the command line then
git clone would behave more like my series of three commands above.
I haven't looked at what it would take to patch git clone for this
purpose. Just wanted to see what you thought.
Cheers,
Carl
--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Carl Baldwin Systems VLSI Laboratory
Hewlett Packard Company
MS 88 work: 970 898-1523
3404 E. Harmony Rd. work: Carl.N.Baldwin@hp.com
Fort Collins, CO 80525 home: Carl@ecBaldwin.net
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC] Not grabbing ALL branches and tags with git clone
2005-11-14 18:26 [RFC] Not grabbing ALL branches and tags with git clone Carl Baldwin
@ 2005-11-14 21:01 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2005-11-14 21:01 UTC (permalink / raw)
To: Carl Baldwin; +Cc: git
Carl Baldwin <cnb@fc.hp.com> writes:
> Lately, I've found that 'git clone' gives me more than what I want.
> Especially when there are a lot of branches and tags in the remote
> repository.
When I make a clone of git.git, oftentimes the first thing I do
is:
$ git branch -D todo
But I've always considered that a rare exception (i.e. the todo
branch is not related to the main source). What kind of
unrelated things do you keep in a single repository such that
you do not want to start out in sync with all of its branches?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-14 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 18:26 [RFC] Not grabbing ALL branches and tags with git clone Carl Baldwin
2005-11-14 21:01 ` Junio C Hamano
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).