{"id":15674532,"url":"https://github.com/jonschlinkert/git-config-path","last_synced_at":"2025-05-05T21:43:06.448Z","repository":{"id":28174642,"uuid":"31676042","full_name":"jonschlinkert/git-config-path","owner":"jonschlinkert","description":"Resolve the path to the user's global .gitconfig.","archived":false,"fork":false,"pushed_at":"2018-11-18T07:28:35.000Z","size":15,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-09T08:56:31.266Z","etag":null,"topics":["confi","config","file","filepath","find","git","git-config","gitconfig","global","javascript","jonschlinkert","node","nodejs","path","search"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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/jonschlinkert.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}},"created_at":"2015-03-04T19:38:30.000Z","updated_at":"2022-07-27T07:03:38.000Z","dependencies_parsed_at":"2022-09-04T16:50:40.760Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/git-config-path","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgit-config-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgit-config-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgit-config-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgit-config-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/git-config-path/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252582241,"owners_count":21771634,"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":["confi","config","file","filepath","find","git","git-config","gitconfig","global","javascript","jonschlinkert","node","nodejs","path","search"],"created_at":"2024-10-03T15:46:21.347Z","updated_at":"2025-05-05T21:43:06.372Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-config-path [![NPM version](https://img.shields.io/npm/v/git-config-path.svg?style=flat)](https://www.npmjs.com/package/git-config-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/git-config-path.svg?style=flat)](https://npmjs.org/package/git-config-path) [![NPM total downloads](https://img.shields.io/npm/dt/git-config-path.svg?style=flat)](https://npmjs.org/package/git-config-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/git-config-path.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/git-config-path)\n\n\u003e Resolve the path to the user's local or global .gitconfig.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save git-config-path\n```\n\n## Usage\n\nAutomatically gets the nearest `.git` config path, starting with the current working directory, then looking in the user's `home` directory.\n\n```js\nvar gitConfigPath = require('git-config-path')();\n//=\u003e '/Users/jonschlinkert/dev/git-config-path/.git/config'\n```\n\nTo force `git-config-path` to only look for a global config path, pass `global`:\n\n```js\nvar gitConfigPath = require('git-config-path')('global');\n//=\u003e '/Users/jonschlinkert/.gitconfig'\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [git-branch](https://www.npmjs.com/package/git-branch): Get the current branch from the local git repository. | [homepage](https://github.com/jonschlinkert/git-branch \"Get the current branch from the local git repository.\")\n* [git-repo-name](https://www.npmjs.com/package/git-repo-name): Get the repository name from the git remote origin URL. | [homepage](https://github.com/jonschlinkert/git-repo-name \"Get the repository name from the git remote origin URL.\")\n* [git-user-name](https://www.npmjs.com/package/git-user-name): Get a user's name from git config at the project or global scope, depending on… [more](https://github.com/jonschlinkert/git-user-name) | [homepage](https://github.com/jonschlinkert/git-user-name \"Get a user's name from git config at the project or global scope, depending on what git uses in the current context.\")\n* [git-username](https://www.npmjs.com/package/git-username): Get the username (or 'owner' name) from a git/GitHub remote origin URL. | [homepage](https://github.com/jonschlinkert/git-username \"Get the username (or 'owner' name) from a git/GitHub remote origin URL.\")\n* [is-git-url](https://www.npmjs.com/package/is-git-url): Regex to validate that a URL is a git url. | [homepage](https://github.com/jonschlinkert/is-git-url \"Regex to validate that a URL is a git url.\")\n* [parse-git-config](https://www.npmjs.com/package/parse-git-config): Parse `.git/config` into a JavaScript object. sync or async. | [homepage](https://github.com/jonschlinkert/parse-git-config \"Parse `.git/config` into a JavaScript object. sync or async.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 18, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fgit-config-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fgit-config-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fgit-config-path/lists"}