Enforce linear history of main branch with git rebase or squash? #18
Replies: 2 comments 7 replies
-
I think it's a matter of taste. What do you prefer? Personally I find a linear history easier to understand and prefer rebasing the PRs. However, to keep things manageable, I would recommend that a contributor should squash their own commits to logical chunks in a PR before merging. Pro: Clean linear history that is easy to understand and bisect. |
Beta Was this translation helpful? Give feedback.
-
As I got now more familiar with Git, I think we should establish this Git-workflow for MDTools. It is basically the same workflow that we agreed on for rs@md. Regarding the rebasing and squashing discussion: When merging a PR, we will use the simple merge that creates a merge commit. However, we will enfore contributors to rebase their topic branch onto the target branch before merging. In this way we will have a quasi-linear history. And we will encourage contributors to squash, split and reorder their commits in logical chunks. I think we can close this discussion now. |
Beta Was this translation helpful? Give feedback.
-
Should we enforce a linear history of the
main
branch?Currently, pull requests to the main branch require before merging
(See About protected branches)
I wonder if we also should enforce a linear history be either rebasing or squashing?
Beta Was this translation helpful? Give feedback.
All reactions