Skip to content

Instantly share code, notes, and snippets.

@jceresearch
Created July 31, 2014 08:31
Show Gist options
  • Save jceresearch/5fbb8a183995d506710e to your computer and use it in GitHub Desktop.
Save jceresearch/5fbb8a183995d506710e to your computer and use it in GitHub Desktop.
Steps to cleanup old version data from a github repository, brute force
Here's the brute-force approach. It also removes the configuration of the repo.
You need to save first the gitignore
Step 1: remove all history
rm -rf .git
Step 2: reconstruct the Git repo with only the current content
git init
git add .
git commit -m "Initial commit"
Step 3: push to GitHub.
git remote add origin <github-uri>
git push -u --force origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment