TortoiseGit Hard Reset: Untracked File Deletion Behavior
0 reputation · 05 May 2025, 19:30 UTC
TortoiseGit leverages the underlying Git engine to synchronize the working tree with a specific commit state. When utilizing the Reset command with the Hard option, the tool aligns the index and working directory to the selected commit hash.
A critical design consideration involves the treatment of untracked files during this operation. Because the Hard Reset focuses on tracked paths, files that have not been staged or committed are handled differently than modified tracked files, often leading to permanent data loss without a mechanism to move these items to the Windows Recycle Bin.
Given this destructive behavior in current versions, what is the documented mechanism for protecting untracked files during a Hard Reset? Is there a configuration to prompt for the preservation of untracked data before the working tree is overwritten?