Skip to content

Instantly share code, notes, and snippets.

@xb4dc0d3
Created January 8, 2022 19:32
Show Gist options
  • Save xb4dc0d3/286dd7c451f19741ad413b0589b539bd to your computer and use it in GitHub Desktop.
Save xb4dc0d3/286dd7c451f19741ad413b0589b539bd to your computer and use it in GitHub Desktop.
Remove all commit into one (remove history of commit)
git checkout --orphan latest_branch
git add -A
git commit -am "<commit message>"
git branch -D master
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