Determines if a git repository exists within a directory
For this project you need Node installed on your machine with Npm or Yarn
Open a terminal and type, inside the directory:
npm i check-git
# OR
yarn add check-git
if(checkGit(process.cwd())) {
console.log('Yes dude, there is a git repository')
} else {
console.log('Sorry dude, there is no git repository is this folder')
}
- Node.js - JavaScript runtime built on Chrome's V8 JavaScript engine.
Pull Requests for adding features ⇄ and ★ are welcome 😎