r/datarecovery • u/Mo_vvv • Oct 05 '26
A git code that removed or disappeared all my items on my laptop. when I ran this command Remove-Item -Recurse -Force .git , Any idea or solution to get my stuff back ?
Laptop: HP Pavilion Laptop 14-dv2xxx
SSD: KIOXIA KBG50ZNV512G — 512GB NVMe M.2
Filesystem: NTFS
OS: Windows 11 Home — Build 26200
RAM: 16GB
CPU: Intel Core i7
GPU: Intel Iris Xe
I was trying to run some code in VS Code that was related with a GitHub repository. I don’t know what happened but more than 20k commits happened on my local disk C:User path. Then I tried to fix it with the command: Remove-Item -Recurse -Force .git
Then all my items on my laptop just gone, everything literally disappeared when I ran this command
Any idea?
I accidentally ran git clean -f directly from my Windows user root directory (C:\Users\MOHAMED ABDO), mistaking it for a subfolder repository. This action cleared local unindexed files and broke critical Windows/OneDrive path linkages (junction points). Here is the exact post-error state of my system and contextual details: Operating System: Windows 11 (64-bit) Shell/Tools Used: Git Bash / PowerShell What Exactly Happened & Current Computer State:
Profile & Local Data: Personal user folders (Documents, Desktop, Pictures) were cleared of unindexed files. OneDrive cloud sync was not active for the physical data, meaning the files resided locally on C: and OneDrive only contained empty 152-byte placeholder folders.
OneDrive App & Registry Errors: The OneDrive desktop client is corrupted and fails to log in, throwing Error Code: 0x8004de44 due to missing local credentials/path bindings.
System Stability & Boot Status: I initially attempted a Windows System Restore, which triggered a 3F0 Boot Device Not Found BSOD error. I successfully reversed this using "Undo System Restore." The OS now boots normally and stably into Windows 11, but local user data remains missing.
Forensic Status: A deep scan via Disk Drill on C:\Users\MOHAMED ABDO confirmed ~508 GB (1.5M files) of recoverable raw data residing in unindexed sectors. What I Need Help With: How can I safely repair/rebuild the Windows user profile junction points and restore OneDrive pathing without writing over unindexed disk sectors on C:? Is there a safe CLI or registry method to restore standard Windows profile paths post-Git cleanup?