This workflow is outside of the "git pull -r origin branchName" workflow we use for rebases without merge commmits. This workflow is just to squash commits on a local/unshared branch. Keep in mind that "rewriting history can make teammates sad, angry or worse" standard warnings about rebasing.
- Choose the commit hash which will "choose everything AFTER this commit to rebase."
- Remember you're rebasing a branch against itself, not src/destination rebasing like normal rebasing workflow.
git rebase -i hash123-everything-after-this-commit
- That'll send you into a screen that's a list of commits. Use rename, squash etc. then :x to save/exit...
- That'll send you into the standard git commit screen. First you'll reword any you marked with reword or r, and save.
- Then you'll be sent back into the standard git commit screen for any commits you squashed. Pick one commit, squash all others you don't want.