Skip to content

Instantly share code, notes, and snippets.

@avin
Last active February 7, 2026 07:22
Show Gist options
  • Select an option

  • Save avin/a6387311fc12bbdfea0a74c728e4f6ea to your computer and use it in GitHub Desktop.

Select an option

Save avin/a6387311fc12bbdfea0a74c728e4f6ea to your computer and use it in GitHub Desktop.
Squash all Git commits into a single commit
git checkout --orphan __squash_tmp
git add -A
git commit -m "init"
git branch -M master
git push -f origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment