Skip to content

Instantly share code, notes, and snippets.

@anaynayak
Last active December 21, 2015 04:28
Show Gist options
  • Save anaynayak/6249602 to your computer and use it in GitHub Desktop.
Save anaynayak/6249602 to your computer and use it in GitHub Desktop.
Handy script to clean up bad code
#!/bin/sh
rm -rf *
mv .git/config /tmp/git_config
rm -rf .git
git init
mv -f /tmp/git_config .git/config
touch .gitignore
git add .
git commit -m "Code cleanup"
git push -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment