Restore files in both the index and working tree from a given source.
The Git tree-ish to restore from.
- "HEAD"- "main"- "HEAD~1"- "commit SHA" Copy
- "HEAD"- "main"- "HEAD~1"- "commit SHA"
"HEAD" Copy
"HEAD"
// Restore from HEADawait git.restoreBoth("file.txt")// Restore multiple files from a commitawait git.restoreBoth(["file1.txt", "file2.txt"],"abc123") Copy
// Restore from HEADawait git.restoreBoth("file.txt")// Restore multiple files from a commitawait git.restoreBoth(["file1.txt", "file2.txt"],"abc123")
0.3.0
Restore files in both the index and working tree from a given source.