Home / Companies / Hookdeck / Blog / Post Details
Content Deep Dive

How To Disable Squash & Merge on Specific GitHub Branches

Blog post from Hookdeck

Post Details
Company
Date Published
Author
Valérian Galliat
Word Count
751
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

The article discusses an issue faced by developers at Hookdeck while using GitHub. They wanted different merging strategies for different branches, but GitHub always defaulted to the last used merge strategy. To address this problem, they built a Chrome and Firefox extension called "GitHub Contextual Merge Strategy". The extension preselects "create a merge commit" when the source branch is main, master, staging or preview, and otherwise selects "squash and merge". It uses MutationObserver to watch for changes in the DOM and webNavigation.onHistoryStateUpdated API to support single-page navigation. The extension has been successfully used by Hookdeck without any accidental squashes.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.