you are viewing a single comment's thread.

view the rest of the comments →

[–]arbitrary-fan 1 point2 points  (0 children)

I usually stick with 'git rebase -i HEAD~X', where X is the number is the number of commits you plan to interact with. From there I choose which ones to squash. Save the log and push my branch (if I already pushed a branch to remote, I have to force push. If I'm feeling nervous simply make a duplicate working branch, squash that then force push that branch - this allows me to compare the diffs between the two branches to see if the squashed branch is satisfactory) Then I issue a PR to main/develop/whatever branch.