useGit API
    Preparing search index...

    Function hasStagedDiff

    • Check whether the index contains staged changes.

      Parameters

      Returns Promise<boolean>

      true if staged changes exist, otherwise false

      if (await git.hasStagedDiff()) {
      console.log("There are staged changes")
      }

      0.2.0