useGit API
    Preparing search index...

    Function restoreBoth

    • Restore files in both the index and working tree from a given source.

      Parameters

      • this: useGit API
      • paths: string | string[]
      • source: string = "HEAD"

        The Git tree-ish to restore from.

        - "HEAD"
        - "main"
        - "HEAD~1"
        - "commit SHA"
        "HEAD"
        

      Returns Promise<useGit API>

      // Restore from HEAD
      await git.restoreBoth("file.txt")

      // Restore multiple files from a commit
      await git.restoreBoth(["file1.txt", "file2.txt"],"abc123")

      0.3.0