{"id":24080149,"url":"https://github.com/pindlebot/has-git","last_synced_at":"2025-07-27T01:05:01.066Z","repository":{"id":57261522,"uuid":"119731032","full_name":"pindlebot/has-git","owner":"pindlebot","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-29T03:42:13.000Z","size":44,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-28T08:39:46.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pindlebot.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-31T19:10:24.000Z","updated_at":"2018-12-29T03:42:15.000Z","dependencies_parsed_at":"2022-08-25T05:11:26.796Z","dependency_job_id":null,"html_url":"https://github.com/pindlebot/has-git","commit_stats":null,"previous_names":["unshift/has-git"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pindlebot/has-git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pindlebot%2Fhas-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pindlebot%2Fhas-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pindlebot%2Fhas-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pindlebot%2Fhas-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pindlebot","download_url":"https://codeload.github.com/pindlebot/has-git/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pindlebot%2Fhas-git/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267278631,"owners_count":24063252,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-01-09T22:56:09.019Z","updated_at":"2025-07-27T01:05:01.041Z","avatar_url":"https://github.com/pindlebot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## has-git\n\n### hasGit([cwd]): Promise\u003cT | F\u003e\n- Checks whether git is initialized for the project. \n\n### getConfig([cwd]): Promise\u003c{}\u003e\n- Returns the project's git config with `git config --list`\n\n## isDirty([cwd]): Promise\u003cT | F\u003e\n- Checks whether the project has untracked changes. Does not check for untracked files.\n\n```js\nconst { hasGit, getConfig, isDirty } = require('has-git')\n\nhasGit().then(result =\u003e {\n  console.log(result) // true\n})\n\ngetConfig().then(result =\u003e {\n  console.log(result) \n  /*\n  {\n    user: { \n      name: 'Steve', \n      email: 'steve@apple.com' \n    },\n    core: { \n      repositoryformatversion: '0',\n      filemode: 'true',\n      bare: 'false',\n      logallrefupdates: 'true',\n      ignorecase: 'true',\n      precomposeunicode: 'true' \n    },\n    remote: { \n      origin: { \n        url: 'https://github.com/unshift/has-git.git',\n        fetch: '+refs/heads/*:refs/remotes/origin/*' \n      } \n    } \n  }\n  */\n})\n\nisDirty().then(result =\u003e {\n  console.log(result) // true if untracked changes are present\n})\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpindlebot%2Fhas-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpindlebot%2Fhas-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpindlebot%2Fhas-git/lists"}