Skip to content

Instantly share code, notes, and snippets.

@JoeChapman
Created June 10, 2016 09:32
Show Gist options
  • Save JoeChapman/7d65fb0af7de00455a600360eaf61b77 to your computer and use it in GitHub Desktop.
Save JoeChapman/7d65fb0af7de00455a600360eaf61b77 to your computer and use it in GitHub Desktop.
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