Skip to content

Instantly share code, notes, and snippets.

@claudius108
claudius108 / git.md
Last active May 10, 2023 16:59 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository

RECREATE A REPO WITH ONLY THE CONTENT

Remove the history

rm -rf .git

recreate the repo from the current content only

git init git add . git commit -m "Initial commit"

push to the github remote repos ensuring you overwrite history