{"id":20395420,"url":"https://github.com/jpeer264/node-git-root","last_synced_at":"2025-08-02T09:32:56.854Z","repository":{"id":57251109,"uuid":"115248986","full_name":"JPeer264/node-git-root","owner":"JPeer264","description":"A module to find the git root synchronously","archived":false,"fork":false,"pushed_at":"2017-12-24T17:41:14.000Z","size":53,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-06T05:43:46.079Z","etag":null,"topics":["git","is-git","repo","repository","root","tool","toplevel"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/git-root","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/JPeer264.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-24T08:08:38.000Z","updated_at":"2023-02-24T18:40:41.000Z","dependencies_parsed_at":"2022-08-24T16:52:03.032Z","dependency_job_id":null,"html_url":"https://github.com/JPeer264/node-git-root","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fnode-git-root","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fnode-git-root/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fnode-git-root/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fnode-git-root/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JPeer264","download_url":"https://codeload.github.com/JPeer264/node-git-root/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224727057,"owners_count":17359533,"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","is-git","repo","repository","root","tool","toplevel"],"created_at":"2024-11-15T03:57:27.607Z","updated_at":"2024-11-15T03:57:28.350Z","avatar_url":"https://github.com/JPeer264.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-root\n\n[![Build Status](https://travis-ci.org/JPeer264/node-git-root.svg?branch=master)](https://travis-ci.org/JPeer264/node-git-root)\n[![Build status](https://ci.appveyor.com/api/projects/status/4rqo2xdyr5wb72g5/branch/master?svg=true)](https://ci.appveyor.com/project/JPeer264/node-git-root/branch/master)\n[![Coverage Status](https://coveralls.io/repos/github/JPeer264/node-git-root/badge.svg?branch=master)](https://coveralls.io/github/JPeer264/node-git-root?branch=master)\n\nGet synchronously the git root path\n\n## Installation\n\n```sh\n$ npm i git-root --save\n```\nor\n```sh\n$ yarn add git-root\n```\n\n## Usage\n\nReturns:\n- String: The git root **or** empty string if it is not a git repository\n\n```js\nconst gitRoot = require('git-root');\n\ngitRoot(); // '' or git root of process.cwd()\ngitRoot('any/git/repo'); // '' or git root of the directory 'any/git/repo'\n```\n\n## LICENSE\n\nMIT © [Jan Peer Stöcklmair](https://www.jpeer.at)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpeer264%2Fnode-git-root","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpeer264%2Fnode-git-root","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpeer264%2Fnode-git-root/lists"}