useGit API
    Preparing search index...

    Function hasDiff

    • Check whether the working tree contains unstaged changes.

      Parameters

      Returns Promise<boolean>

      true if unstaged changes exist, otherwise false

      if (await git.hasDiff()) {
      console.log("Working tree has changes")
      }

      0.2.0