Re: git-clone and unreliable links?
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Nov 7, 2012, 15:54 UTC
- Message-ID
- <CAJo=hJtJPnQFjvz8AAQjf5Rze-_99vF_tYi9CqJ7fiW245Dv1w@mail.gmail.com>
- In-Reply-To
- <20121107153519.GI28437@raven.wolf.lan>
On Wed, Nov 7, 2012 at 7:35 AM, Josef Wolf <jw@raven.inka.de> wrote:
Show 8 quoted lines
> When using git-clone over an unreliable link (say, UMTS) and the network goes > down, git-clone deletes everything what was downloaded. When the network goes > up again and you restart git-clone, it has to start over from the > beginning. Then, eventually, the network goes down again, and everything is > deleted again. > > Is there a way to omit the deleting step, so the second invocation would start > where the first invocation was interrupted?
No, because a clone is not resumable.
The best way to obtain a repository over an unstable link is to ask the repository owner to make a bundle file with `git bundle create --heads --tags` and serve the file using standard HTTP or rsync, which are resumable protocols. After you download the file, you can clone or fetch from the bundle to initialize your local repository, and then run git fetch to incrementally update to anything that is more recent than the bundle's creation.