Angular Modernizer
    Preparing search index...

    Git integration for backup and rollback using git stash.

    Index

    Constructors

    Methods

    • Record the working tree state of tracked files without touching the working tree, the index or the stash list (git stash create). With no local changes the snapshot is HEAD. Returns the commit, or undefined outside a git repository or without any commit.

      Returns Promise<string | undefined>

    • Create a git stash as backup.

      Parameters

      • message: string
      • Optionalfiles: string[]

      Returns Promise<GitOperationResult>

    • Get changes in working directory.

      Returns Promise<string[]>

    • Get git root directory.

      Returns Promise<string | null>

    • Check if current directory is a git repository.

      Returns Promise<boolean>

    • Check if working directory is clean.

      Returns Promise<boolean>

    • Content of a file as recorded in a snapshot commit. Fails when the file lies outside the repository root or was not tracked at snapshot time.

      Parameters

      • commit: string
      • filePath: string

      Returns Promise<GitOperationResult>