Skip to content

Instantly share code, notes, and snippets.

@simonsan
Created September 12, 2023 08:00
Show Gist options
  • Save simonsan/03e7b35b52afe9479c3f8f051eb4a93d to your computer and use it in GitHub Desktop.
Save simonsan/03e7b35b52afe9479c3f8f051eb4a93d to your computer and use it in GitHub Desktop.
Prune repositories
git checkout --orphan freshBranch
git add -A
git commit
git branch -D main
git branch -m main
git push -f origin main
git gc --aggressive --prune=all
git push -f origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment