Skip to content

Instantly share code, notes, and snippets.

@NobsterDev
NobsterDev / gist:108e114d4abced855dd1554badf169c7
Created January 29, 2024 16:24
Deleting history on a repo
# Create a new orphan branch (unrelated to the current branches)
git checkout --orphan new_branch
# Add all files to the new branch
git add -A
# Make the initial commit
git commit -m "Initial commit"
# Delete the old main branch locally (replace 'main' with your branch name)