you cant squash like that, as it cant track the commits. i prefer to generally, work in a branch or fork, and keep rebasing my commits into a clean commit and force push until an upstream is ready to accept the PR. this keeps out conflicts and makes PRs easy, but it ruins others being able to work with your branch (because of the force push).

you might be interested in 'git flow' workflow. i dont like it that much but i also dont tend to have long running feature branches that multiple people commit into.

Reply to this note

Please Login to reply.

Discussion

Hmm, yeah I'd want to avoid the force push as it ruins many of my automations as well.

It's mostly I like the flow of squash (history is ignored and changes are merged) however after enough changes it makes PR comparisons really long which is the issue.

i like rebase w squash too, because i use cmd line git and it makes it easier for me to diff and tidy things up for a PR when i squash it down... its not so bad for automation.. tho the automation has to do a reset of the local copy of the branch /fresh checkout.

For now, I'm solo on most of my projects and I don't usually have long running feature branches either, or at least I try not to.