Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow only squash merging #12173

Open
LukasHirt opened this issue Feb 10, 2025 · 4 comments
Open

Allow only squash merging #12173

LukasHirt opened this issue Feb 10, 2025 · 4 comments

Comments

@LukasHirt
Copy link
Collaborator

LukasHirt commented Feb 10, 2025

Current situation

We're using merge commits which are bringing all commits as separate commits into master branch.

Issues with current situation

Since we're maintaining stable branches, we are often doing backports into them to bring new features, bug fixes, etc. With the current solution, if a single PR brings in 10 commits, we need to make sure that we understand the change includes all 10 commits and need to backport all of them into the stable branch. This is 💩

Proposed solution

Start using squash merging instead of merge commits. This would squash all commits into a single commit before pushing to master meaning when backporting we would be sure that we need to backport only a single commit. A nice benefit is that this does not really affect person who's merging the PR because it is done automatically.

@LukasHirt
Copy link
Collaborator Author

@kobergj @mzner what do you think about this gentlemen?

@mzner
Copy link
Contributor

mzner commented Feb 10, 2025

@LukasHirt Sounds good to me. It makes sense to keep multiple commits -- just in case we need to cherry pick a commit, fix one particular commit or look closely into a specific commit, but before merging, I would squash all of them into one.

@kobergj
Copy link
Contributor

kobergj commented Feb 11, 2025

The problem with squash merging is that you can't cherry pick specific commits (they are all squashed into one). This can bring problems when trying to pick only part of a pullrequest. But after all I don't have a strong opinion in this. If you both want to do squash merging, we'll do it like this 👍 We can still review and reassess this decision after a while...

@LukasHirt
Copy link
Collaborator Author

This can bring problems when trying to pick only part of a pullrequest

Can you think of some scenarios where only certain commits of a PR might be needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants