Skip to content

Instantly share code, notes, and snippets.

@Datseris
Created February 18, 2026 13:17
Show Gist options
  • Select an option

  • Save Datseris/d23a46333d20aada2b3ae63f97437d47 to your computer and use it in GitHub Desktop.

Select an option

Save Datseris/d23a46333d20aada2b3ae63f97437d47 to your computer and use it in GitHub Desktop.
Delete git history and replace branch with one without history
git checkout --orphan new-branch
git add -A
git commit -m "Initial commit with no history"
git branch -D master
git branch -m master
@Datseris
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment