Skip to content

Instantly share code, notes, and snippets.

@SanteriHetekivi
Created March 4, 2026 19:11
Show Gist options
  • Select an option

  • Save SanteriHetekivi/340b22b411de6bde14486e007e059056 to your computer and use it in GitHub Desktop.

Select an option

Save SanteriHetekivi/340b22b411de6bde14486e007e059056 to your computer and use it in GitHub Desktop.
Reset git main branch to contain only one commit.
git checkout --orphan temp_branch &&
git add -A &&
git commit -m "TODO" &&
git branch -D main &&
git branch -m main &&
git push origin main --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment