> 5. When merge happens a dev's PR is squashed into one commit that gets appended to `main`
I don't know if GitHub supports this, but GitLab has a semi-linear history feature. When enabled, it won't let you merge unless a fast-forward merge is possible, but it never does a fast-forward merge.
This give you (IMHO) the best of both worlds: your history is pretty linear and easy to reason about. The "first parent" of each commit on the main branch is a linear chain of the main branch history. However, for more complex changes you don't have to squash. Those intermediate commits will be on the second parent of merges, so they're easy to filter out:
M─┐ [main] merge
│ o commit
M─┤ merge
│ o commit
M─┤ merge
│ o commit
│ o commit
M─┤ merge
│ o commit
> 5. When merge happens a dev's PR is squashed into one commit that gets appended to `main`
I don't know if GitHub supports this, but GitLab has a semi-linear history feature. When enabled, it won't let you merge unless a fast-forward merge is possible, but it never does a fast-forward merge.
This give you (IMHO) the best of both worlds: your history is pretty linear and easy to reason about. The "first parent" of each commit on the main branch is a linear chain of the main branch history. However, for more complex changes you don't have to squash. Those intermediate commits will be on the second parent of merges, so they're easy to filter out:
> If you want interactive rebase then make 2 PRs.What do you mean?