From: Konstantin Khomoutov <kostix+git@007spb.ru>
To: git@vger.kernel.org
Subject: Pushing/fetching from/into a shallow-cloned repository
Date: Thu, 18 Apr 2013 13:52:33 +0400 [thread overview]
Message-ID: <20130418135233.87aa23896fa48dc2d87d80fb@domain007.com> (raw)
The git-clone manual page, both [1] and my local copy coming with
Git for Windows 1.8.1, say about the --depth command-line option:
--depth <depth>
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 shallow
clone just fine.
So I observe pushing/fetching works OK at least for a simple case like
this one.
Hence I'd like to ask: if the manual page is wrong or I'm observing
some corner case?
next reply other threads:[~2013-04-18 9:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 9:52 Konstantin Khomoutov [this message]
2013-04-18 9:59 ` Pushing/fetching from/into a shallow-cloned repository Konstantin Khomoutov
2013-04-18 20:27 ` Philip Oakley
2013-04-18 22:46 ` Junio C Hamano
2013-04-19 16:02 ` Konstantin Khomoutov
2013-04-19 11:22 ` Duy Nguyen
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=20130418135233.87aa23896fa48dc2d87d80fb@domain007.com \
--to=kostix+git@007spb.ru \
--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).