Clear out untracked files when restoring a checkpoint (#1139)

This commit is contained in:
Louis Jimenez 2025-06-17 22:01:42 -04:00 committed by GitHub
parent 87053d9317
commit 443465a805
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -110,5 +110,7 @@ export class GitService {
async restoreProjectFromSnapshot(commitHash: string): Promise<void> {
const repo = this.shadowGitRepository;
await repo.raw(['restore', '--source', commitHash, '.']);
// Removes any untracked files that were introduced post snapshot.
await repo.clean('f', ['-d']);
}
}