{"id":17399232,"url":"https://github.com/feross/git-pull-or-clone","last_synced_at":"2025-09-13T02:31:59.205Z","repository":{"id":20342341,"uuid":"89655272","full_name":"feross/git-pull-or-clone","owner":"feross","description":"Ensure a git repo exists on disk and that it's up-to-date","archived":false,"fork":false,"pushed_at":"2023-03-29T12:25:57.000Z","size":38,"stargazers_count":52,"open_issues_count":4,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T22:29:30.158Z","etag":null,"topics":["clone","git","javascript","nodejs","pull","repository"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feross.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":"2017-04-28T01:30:20.000Z","updated_at":"2023-09-29T11:05:02.000Z","dependencies_parsed_at":"2024-06-18T18:19:31.118Z","dependency_job_id":"343400a5-de5c-4113-a2e5-9a116ed384e2","html_url":"https://github.com/feross/git-pull-or-clone","commit_stats":{"total_commits":34,"total_committers":6,"mean_commits":5.666666666666667,"dds":"0.38235294117647056","last_synced_commit":"e04b98c88f45a652f29fa2df10584a68d908c0df"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fgit-pull-or-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fgit-pull-or-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fgit-pull-or-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fgit-pull-or-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feross","download_url":"https://codeload.github.com/feross/git-pull-or-clone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232810806,"owners_count":18579924,"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":["clone","git","javascript","nodejs","pull","repository"],"created_at":"2024-10-16T15:13:39.880Z","updated_at":"2025-01-07T01:49:50.199Z","avatar_url":"https://github.com/feross.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-pull-or-clone [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]\n\n[ci-image]: https://img.shields.io/github/workflow/status/feross/git-pull-or-clone/ci/master\n[ci-url]: https://github.com/feross/git-pull-or-clone/actions\n[npm-image]: https://img.shields.io/npm/v/git-pull-or-clone.svg\n[npm-url]: https://npmjs.org/package/git-pull-or-clone\n[downloads-image]: https://img.shields.io/npm/dm/git-pull-or-clone.svg\n[downloads-url]: https://npmjs.org/package/git-pull-or-clone\n\n### Ensure a git repo exists on disk and that it's up-to-date\n\n## Install\n\n```\nnpm install git-pull-or-clone\n```\n\n## Usage\n\n```js\nconst gitPullOrClone = require('git-pull-or-clone')\n\ngitPullOrClone('git@github.com:feross/standard.git', '/path/to/destination', (err) =\u003e {\n  if (err) throw err\n  console.log('SUCCESS!')\n})\n```\n\n## API\n\n### `gitPullOrClone(url, outPath[, options], callback)`\n\nEnsure a git repo exists on disk and that it's up-to-date.\n\nClones the git repo specified by `url` to the path `outPath`. If the repo already exists on disk,\nthen a pull is performed to update the repo instead.\n\nThe git repo is shallowly cloned by default. To make a complete clone, set `options.depth` to `Infinity`. If the git repo was previously cloned shallowly, it remains shallow.\n\nWhen the operation is finished, `callback` is called. The first argument to `callback` is either\n`null` or an `Error` object if an error occurred.\n\n## License\n\nMIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fgit-pull-or-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeross%2Fgit-pull-or-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fgit-pull-or-clone/lists"}