code: function getGitFolderPath(currentPath) {
    var git = path.resolve(currentPath, '.git')
  
    if (!exists(git) || !fs.lstatSync(git).isDirectory()) {
      console.log('pre-commit:');
      console.log('pre-commit: Not found .git folder in', git);
      
      var newPath = path.resolve(currentPath, '..');
  
      // Stop if we on top folder
      if (currentPath === newPath) {
        return null;
      }
  
      return getGitFolderPath(newPath);
    }
  
    console.log('pre-commit:');
    console.log('pre-commit: Found .git folder in', git);
    return git;
  }
docs: Function to recursively finding .git folder