https://github.com/axelrindle/node-is-git-repository
Node.js package for testing whether a given directory is a git repository.
https://github.com/axelrindle/node-is-git-repository
git nodejs
Last synced: 2 months ago
JSON representation
Node.js package for testing whether a given directory is a git repository.
- Host: GitHub
- URL: https://github.com/axelrindle/node-is-git-repository
- Owner: axelrindle
- License: mit
- Created: 2020-07-24T18:22:48.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-04-03T11:07:29.000Z (over 4 years ago)
- Last Synced: 2025-02-15T10:42:00.279Z (over 1 year ago)
- Topics: git, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@axelrindle/is-git-repository
- Size: 312 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://www.codacy.com/manual/axelrindle/node-is-git-repository?utm_source=github.com&utm_medium=referral&utm_content=axelrindle/node-is-git-repository&utm_campaign=Badge_Grade)
[](https://www.codacy.com/manual/axelrindle/node-is-git-repository?utm_source=github.com&utm_medium=referral&utm_content=axelrindle/node-is-git-repository&utm_campaign=Badge_Coverage)
# node-is-git-repository
Node.JS package for testing whether a given directory belongs to a git repository.
## Installation
```bash
$ npm i @axelrindle/is-git-repository
```
## Usage
```js
const isGitRepository = require('@axelrindle/is-git-repository');
(async () => {
await isGitRepository(); // fails when not in a valid git repository
// ...
})();
```
[Check the wiki](https://github.com/axelrindle/node-is-git-repository/wiki/API) for a full API overview.
## License
[MIT](LICENSE)