Check whether the working tree contains unstaged changes.
true if unstaged changes exist, otherwise false
true
false
if (await git.hasDiff()) { console.log("Working tree has changes")} Copy
if (await git.hasDiff()) { console.log("Working tree has changes")}
0.2.0
Check whether the working tree contains unstaged changes.