[Top][All Lists]

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

Re: git hang-ups

From: Trevor Daniels
Subject: Re: git hang-ups
Date: Sat, 8 Aug 2009 08:54:16 +0100

Patrick McCarty wrote Saturday, August 08, 2009 5:00 AM

On Fri, Aug 07, 2009 at 08:39:16PM -0700, Mark Polesky wrote:

Patrick McCarty wrote:

> I've just tested git's shallow cloning feature. It's pretty > neat.
> :-)
> From what I can see, shallow clones would be okay for *casual*
> contributors that are only sending patches based on the tip of > master.
> However, since git history is limited to the depth of the > clone, then > shallow clones would not permit a developer to revert a commit > from,
> say, three weeks ago.
> In other words, I think both the "git clone" and "git > clone --depth"
> methods should be included in the CG.

To me, it seems that a developer should be able to just stick to
shallow clones for everyday use. I assume that one could simply
increase the depth of the clone when needed. Is that true? I've never
needed to revert a three-week old commit, but if I needed to, I
figure I would just do another clone with a greater depth.

Does it work that way?

I suppose that sounds reasonable, but if you "reclone" a repository two or three times, each time with greater depth, then you'll probably
be using more bandwidth than if you had just downloaded the entire
repo initially (with "git clone").

Really, it all depends on how developers use git history.

Personally, I browse git history on the command line quite often when
working with LilyPond.

A while back, I needed to find a change made to a certain file several years ago (I don't remember which file). To exacerbate the problem,
the file had been renamed once or twice.  But git makes this easy:

 $ git log -p --follow file.scm

Then I found the commit I was looking for very quickly.

But maybe others don't use git history quite as extensively. I don't

I'm only a documentation editor, but I've found it useful to
browse history many times, often going back several
years.  When I first tangled with git I also found browsing
history with gitk very elucidating - without an extensive
example of a git repository in front of me it would have
taken me even longer to master git.

I would recommend using git clone with a shallow depth
only by someone with a very poor internet connection or
very limited disk space.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]