code: function checkGitRepoExistence() {
          return new Promise(function(resolve, reject) {
              var checkRepoCommand = childProcess.exec('git branch');
  
              checkRepoCommand.stderr.on('data', function(err) {
                  reject(err);
              });
  
              checkRepoCommand.on('close', function(code) {
                  if (code === 0) { //0 means ok, 128 means error
                      resolve();
                  }
              });
          });
      }
docs: Exec git branch to check if exist .git files