git-fastclone is git clone --recursive on steroids.
Doing lots of repeated checkouts on a specific machine?
|Repository||1st Fastclone||2nd Fastclone||git clone||cp -R|
|linux||4m 53s||1m 6s||3m 51s||29s|
Above times captured using
time without verbose mode.
What does it do?
It creates a reference repo with
git clone --mirror in
/var/tmp/git-fastclone/reference for each
repository and git submodule linked in the main repo. You can control where it puts these by
REFERENCE_REPO_DIR environment variable.
It aggressively updates these mirrors from origin and then clones from the mirrors into the directory of your choosing. It always works recursively and multithreaded to get your checkout up as fast as possible.
Detailed explanation here.
gem install git-fastclone git fastclone [options] <git-repo-url> -b, --branch <branch> Clone a specific branch -v, --verbose Shows more info -c, --color Pretty colors!
Change the default
REFERENCE_REPO_DIR environment variable if necessary.
Cygwin users need to add
~/bin to PATH.
How to test?
ruby -Ilib bin/git-fastclone <git url>
Compatible with Travis and Kochiku.
If you would like to contribute to git-fastclone, you can fork the repository and send us pull requests.
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible.
Before accepting any pull requests, we need you to sign an Individual Contributor Agreement (Google form).
thoughtbot/terrapin - jyurek and collaborators
Copyright 2015 Square Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.