NOTES
Squash entire git branch
You’ve done a lot of work on a branch and now want to turn the various commits into a single clean commit for merging. GitHub provides an option to do this as “squash and merge”. You can use git rebase to select a number of commits and their comments and merge them together.
If you don’t care about keeping any comments from the previous commits then resetting your branch from the point the branch was created, staging them, and then committing.
To set if you are using bash:
git reset $(git merge-base main $(git rev-parse --abbrev-ref HEAD))
To reset if you are using fish:
git reset (git merge-base main (git rev-parse --abbrev-ref HEAD))
After resetting you can then do:
git add .
git commit