Skip to content

Instantly share code, notes, and snippets.

View Fedec96's full-sized avatar

Federico Cappelletti Fedec96

  • Italy
View GitHub Profile
@Fedec96
Fedec96 / COMPACT_WSL_DISK.md
Last active December 8, 2025 01:48
Combine PowerShell and diskpart to get your storage space back.

Compact WSL Disk

Combine PowerShell and diskpart to get your storage space back.

1. Ensure WSL is off

wsl --shutdown
@Fedec96
Fedec96 / reset.sh
Last active February 7, 2022 11:08
Reset the commit history for a repository
#!/bin/bash
# Make the current commit the only (initial) commit in the target repository.
git checkout --orphan newBranch
git add .
git commit -m "Initial commit"
git branch -D main
git branch -m main
git push -f origin main