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

CONTRIBUTING.rst: inform about squash merges #3747

Merged
merged 1 commit into from
Jan 21, 2024
Merged

Conversation

Kwpolska
Copy link
Member

Squash merges make history cleaner. I can’t force squash merges, but I can at least disable merge commits, so squash merges are the most likely.

@Kwpolska Kwpolska merged commit daab52f into master Jan 21, 2024
11 checks passed
@Kwpolska Kwpolska deleted the Kwpolska-patch-1 branch January 21, 2024 09:02
@felixfontein
Copy link
Contributor

@Kwpolska actually you can force squash merges, assuming you have access to the repo's settings, by disabling both "Allow merge commits" and "Allow rebase merging". Also you can add/modify a branch protection for the main branch and enable "Require linear history" there (make sure that "Do not allow bypassing the above settings" is also checked), which will disallow pushing merge commits to that branch.

@Kwpolska
Copy link
Member Author

Thanks, I only looked in the branch protection options, I didn’t know about the options on the main settings page. I disabled the other merge options and removed probably from the added line.

@felixfontein
Copy link
Contributor

Yeah, the settings are quite spread out, it always takes me some time to find them all, even knowing that they exist :) (Especially when changing between GitHub and GitLab; both have their own settings maze...)

@Kwpolska
Copy link
Member Author

(Or Azure DevOps, the original Microsoft GitHub I use at work, which considers merge types part of branch policy.)

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

Successfully merging this pull request may close these issues.

2 participants