Skip to content

Instantly share code, notes, and snippets.

@lazypwny751
Last active October 29, 2025 16:01
Show Gist options
  • Select an option

  • Save lazypwny751/1186373e5dc276566cf065338a633604 to your computer and use it in GitHub Desktop.

Select an option

Save lazypwny751/1186373e5dc276566cf065338a633604 to your computer and use it in GitHub Desktop.
Remove old and start fresh in git.
# 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