I want to clone LibreOffice. From the official website, this is what's written:
All our source code is hosted in git:
Clone:
$ git clone git://anongit.freedesktop.org/libreoffice/core
# (browse)Clone (http):
$ git clone http://anongit.freedesktop.org/git/libreoffice/core.git
# slowerTarballs:
http://download.documentfoundation.org/libreoffice/src/
please find the latest versions (usually near the bottom)
now, when I write this command in git bash to clone, it starts fetching. But the repository is so big that after hours I lose connectivity for a few seconds, it rolls back the download, and I get nothing.
Is there any way I can download the repository smoothly even if interruptions occur?
P.S. I am a new user of Git and I use a 1 MB DSL internet connection. The repository must be over 1 GB.
Restarting the clone just restarts the process, which is likely to fail again. As a workaround, use a hosted server that has good connectivity to the git repository and ssh access from your local. Clone to the server, then rsync to your local over ssh, and resume the rsync as needed.
Using submodules One way out of the problem of large files is to use submodules, which enable you to manage one Git repository within another. You can create a submodule, which contains all your binary files, keeping the rest of the code separately in the parent repository, and update the submodule only when necessary.
Git shallow clone lets you pull down just the latest commits, not the entire repo history. So if your project has years of history, or history from thousands of commits, you can select a particular depth to pull.
The repository is accessible via the http
protocol (aka dumb protocol) here: http://anongit.freedesktop.org/git/libreoffice/core.git.
You can download everything here with wget
or another download manager, and you'll have a clone of the repository. After that, you rename the directory from core.git
to .git
, and use the following command to tell git about the remote url:
$ git remote add remote http://anongit.freedesktop.org/git/libreoffice/core.git $ git reset --hard HEAD
do 'git clone --depth 100' It should grab the last 100 commits
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With