Git
How to Squash All Commits in Git and GitLab (Branch, Last N or Entire History)
Squash all commits on a branch into one, squash the last few commits, or reset the whole history to a single commit, with tested commands for each case. Plus GitLab's Squash and merge, safe force pushing and how to undo a squash.