Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Apache Kafka Squash Merge

From Leeroopedia


Knowledge Sources
Domains Development_Workflow, Version_Control
Last Updated 2026-02-09 12:00 GMT

Overview

A version control merge strategy that combines all PR commits into a single squash commit with proper attribution on the target branch.

Description

Squash Merge takes all commits from a pull request and combines them into a single commit on the target branch. The resulting commit message includes the standardized JIRA reference, PR description, author attribution (including co-authors), reviewer credits, and a Closes #N trailer. This produces a clean, linear history on the main branch while preserving full attribution.

Usage

Use this principle when merging PRs to the main development branch. Squash merge is the standard merge strategy for the Apache Kafka project, ensuring a clean commit history.

Theoretical Basis

  1. Branch Fetch: Fetch the PR branch from the contributor's remote.
  2. Squash Merge: Use git merge --squash to combine all PR commits into a single staged change.
  3. Commit Construction: Create the merge commit with formatted message including author, reviewers, and Closes #N.
  4. Attribution: Preserve authorship by setting the commit author to the PR author and including co-authored-by trailers.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment