From: "Konstantin Khomoutov" <kostix+...@007spb.ru>
Sent: Thursday, April 18, 2013 10:52 AM
The git-clone manual page, both  and my local copy coming with
Git for Windows 1.8.1, say about the --depth command-line option:
Create a shallow clone with a history truncated to the specified
number of revisions. A shallow repository has a number of
limitations (you cannot clone or fetch from it, nor push from nor
into it), but is adequate if you are only interested in the recent
history of a large project with a long history, and would want to
send in fixes as patches.
But having done a shallow clone (--depth=1) of one of my repositories,
I was able to record a new commit, push it out to a "reference" bare
repository and then fetch back to another clone of the same repository
just fine. I have then killed my test commit doing a forced push from
another clone and subsequently was able to do `git fetch` in my
clone just fine.
So I observe pushing/fetching works OK at least for a simple case like
Hence I'd like to ask: if the manual page is wrong or I'm observing
some corner case?
The manual is deliberately misleading.
The problem is that the depth is a movable feast that depends on how far
the branches have progressed.
The DAG will be missing the historic merge bases, and in some scenarios
can form disconnected runs of commits. The ref negotiation can also be a
The git\Documentation\technical\shallow.txt has some extra details on
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html