Re: How to repair a shallow clone (?)
- From
Philip Oakley <philipoakley@iee.org>
- Date
- Dec 7, 2014, 10:47 UTC
- Message-ID
- <C4634931164E4141BEC9D1395D80CF9B@PhilipOakley>
- In-Reply-To
- <5483A166.4010109@gmail.com>
From: "Trần Ngọc Quân" <vnwildman@gmail.com>
Show 16 quoted lines
> On 06/12/2014 19:23, Torsten Bögershausen wrote: >> I think I started to clone the repo in a shallow way >> (SparkleShare asked if I want to clone the complete history, >> and I probably answered "no" ) >> >> Is there a way to repair this situation ? >> (Except doing a complete re-clone ?) >> > I think git don't accept push from shallow repo. I've ever encounter > this problem. I UNshallow it, then every thing will work: > > $ git fetch --unshallow origin > > This command will convert a shallow repository to a complete one. > See git-fetch(1) and git-clone(1). >
Since v1.9.0 (14 Feb '14.) you can do various push/pull from a shallow clone (I'd asked this way back http://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone and noted when it was corrected/improved)
That's not to say that you don't have to take care about your local depth being sufficiently inclusive.
I'm sure that sometime a --timedepth=<time_t time> will eventually be coded by someone sufficiently in need. ;-)
-- Philip