Last active
October 29, 2025 16:01
-
-
Save lazypwny751/1186373e5dc276566cf065338a633604 to your computer and use it in GitHub Desktop.
Remove old and start fresh in git.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Remove old commits and keep current status. | |
| rm -rf .git | |
| git init | |
| git add . | |
| git commit -m "🎯 fresh start." | |
| # Add remote. | |
| git branch -M main | |
| git remote add origin <repo-url> | |
| # Force push. | |
| git push -u origin main --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment