{"id":13579907,"url":"https://github.com/square/git-fastclone","last_synced_at":"2025-04-13T00:46:05.520Z","repository":{"id":33116390,"uuid":"36754803","full_name":"square/git-fastclone","owner":"square","description":"git clone --recursive on steroids","archived":false,"fork":false,"pushed_at":"2024-08-02T01:34:14.000Z","size":582,"stargazers_count":189,"open_issues_count":4,"forks_count":28,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-13T00:45:38.810Z","etag":null,"topics":["git"],"latest_commit_sha":null,"homepage":"https://square.github.io/git-fastclone/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/square.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-02T18:56:14.000Z","updated_at":"2025-04-03T16:09:29.000Z","dependencies_parsed_at":"2024-02-23T00:24:32.487Z","dependency_job_id":"2190d45d-7eee-463b-aab5-869d705c287f","html_url":"https://github.com/square/git-fastclone","commit_stats":{"total_commits":80,"total_committers":13,"mean_commits":6.153846153846154,"dds":0.6875,"last_synced_commit":"0ac13db86029b50d49fbfc8e43312c4734e97bf0"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fgit-fastclone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fgit-fastclone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fgit-fastclone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fgit-fastclone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/square","download_url":"https://codeload.github.com/square/git-fastclone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650420,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git"],"created_at":"2024-08-01T15:01:44.588Z","updated_at":"2025-04-13T00:46:05.495Z","avatar_url":"https://github.com/square.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"git-fastclone\n=============\n\n[![Twitter: @longboardcat13](https://img.shields.io/badge/contact-@longboardcat13-blue.svg?style=flat)](https://twitter.com/longboardcat13)\n[![License](https://img.shields.io/badge/license-Apache-green.svg?style=flat)](https://github.com/square/git-fastclone/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/square/git-fastclone.svg?branch=master)](https://travis-ci.org/square/git-fastclone)\n[![Gem Version](https://badge.fury.io/rb/git-fastclone.svg)](http://badge.fury.io/rb/git-fastclone)\n\ngit-fastclone is git clone --recursive on steroids.\n\n\nWhy fastclone?\n--------------\nDoing lots of repeated checkouts on a specific machine?\n\n| Repository | 1st Fastclone | 2nd Fastclone | git clone | cp -R |\n| -----------|---------------|---------------|-----------|-------|\n| angular.js |    8s         |     3s        | 6s        | 0.5s  |\n| bootstrap  |    26s        |     3s        | 11s       | 0.2s  |\n| gradle     |    25s        |     9s        | 19s       | 6.2s  |\n| linux      |    4m 53s     |     1m 6s     | 3m 51s    | 29s   |\n| react.js   |    18s        |     3s        | 8s        | 0.5s  |\n| tensorflow |    19s        |     4s        | 8s        | 1.5s  |\n\nAbove times captured using `time` without verbose mode.\n\n\nWhat does it do?\n----------------\nIt creates a reference repo with `git clone --mirror` in `/var/tmp/git-fastclone/reference` for each\nrepository and git submodule linked in the main repo. You can control where it puts these by\nchanging the `REFERENCE_REPO_DIR` environment variable.\n\nIt aggressively updates these mirrors from origin and then clones from the mirrors into the\ndirectory of your choosing. It always works recursively and multithreaded to get your checkout up as\nfast as possible.\n\nDetailed explanation [here](https://developer.squareup.com/blog/introducing-git-fastclone/).\n\n\nUsage\n-----\n    gem install git-fastclone\n    git fastclone [options] \u003cgit-repo-url\u003e\n\n    -b, --branch BRANCH              Checkout this branch rather than the default\n    -v, --verbose                    Verbose mode\n        --print_git_errors           Print git output if a command fails\n    -c, --color                      Display colored output\n        --config CONFIG              Git config applied to the cloned repo\n        --lock-timeout N             Timeout in seconds to acquire a lock on any reference repo.\n                Default is 0 which waits indefinitely.\n        --pre-clone-hook command     An optional command that should be invoked before cloning mirror repo\n\nChange the default `REFERENCE_REPO_DIR` environment variable if necessary.\n\nCygwin users need to add `~/bin` to PATH.\n\n\nHooks\n-----\n\n- `pre-clone-hook` is invoked right before cloning a new mirror repo, which gives a change to prepopulate git's mirror from a different source.\nThe hook is invoked with given arguments:\n1. cloning repo url\n1. path to the repo mirror location\n1. attempt number, 0-indexed\n\nHow to test?\n------------\nManual testing:\n\n    ruby -Ilib bin/git-fastclone \u003cgit url\u003e\n\nCompatible with Travis and Kochiku.\n\n\nContributing\n------------\nIf you would like to contribute to git-fastclone, you can fork the repository and send us pull\nrequests.\n\nWhen submitting code, please make every effort to follow existing conventions and style in order to\nkeep the code as readable as possible.\n\nBefore accepting any pull requests, we need you to sign an [Individual Contributor Agreement](https://docs.google.com/a/squareup.com/forms/d/13WR8m5uZ2nAkJH41k7GdVBXAAbzDk00vxtEYjd6Imzg/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ\u0026ndplr=1)\n(Google form).\n\nOnce landed, please reach out to any owner listed in https://rubygems.org/gems/git-fastclone and ask them to help publish the new version.\n\n\nAcknowledgements\n----------------\n* [robolson](https://github.com/robolson)\n* [ianchesal](https://github.com/ianchesal)\n* [mtauraso](https://github.com/mtauraso)\n* [chriseckhardt](https://github.com/chriseckhardt)\n\n\nLicense\n-------\n    Copyright 2015 Square Inc.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquare%2Fgit-fastclone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquare%2Fgit-fastclone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquare%2Fgit-fastclone/lists"}