Enforce linear history in develop?
yannikschaelte opened this issue · 6 comments
One could enforce that pull requests to develop are "squashed and merged", i.e. compressed into a single commit. This would make the history cleaner, getting rid of many "test123" commits. Disadvantage: This can lead to strange conflicts that need to be merged afterwards sometimes if branches were forked at different stages.
Would imply setting that hook in the branch settings.
An alternative to get rid of commits "test123" is for each person, before pushing the branch, to use git rebase interactive to squash that kind of commits.
Yes, also saw that our git history is super messed up. Would be fine with both, slight preference to enforcing squash&merge
Disadvantage: This can lead to strange conflicts that need to be merged afterwards sometimes if branches were forked at different stages.
Also in favour of "squash and merge" but I'm not sure how much effort it could take to resolve the issue described here. Are these the conflicts that are usually fixed in PR branches prior to merging into develop
? If so, then "squash and merge" is fine for me, since it's usually not much effort to resolve these conflicts.
Both can well coincide I think, maybe we can just try to "squash and merge" whenever suitable to develop. @martamatos thanks, I was not aware of this possibility.
So, squash and merge to develop will be? :)
Enabled that now in the settings :) happy to undo if it gets annoying