Skip to main content

has_uncommitted_changes

Function has_uncommitted_changes 

Source
pub fn has_uncommitted_changes(
    path: impl AsRef<Path>,
) -> Result<bool, GitOpsError>
Expand description

Check if the working directory has uncommitted changes.

Returns true if there are:

  • Untracked files (not in .gitignore)
  • Staged changes
  • Unstaged modifications

ยงArguments

  • path - Path to the git repository (or worktree)