2. Adopt Squash Merge for Release Branches and Merge Commit for Change Branches

Date: 2024-03-20

Status

Proposed

Context

We need to decide on a merge strategy that keeps our commit history clean and meaningful while preserving the detailed history of individual changes.

Decision

We have decided to adopt the following strategies for merging branches into the base branch:

Squash Merge for Release Branches: We will use the Squash Merge strategy when merging the release branch into the base branch. It will combine all the commits in the release branch into a single commit in the base branch. It helps keep the base branch's history clean and easy to understand.

Merge Commit for Change Branches: When merging change branches (branches for feature additions, refactoring, etc.) into the base branch, we will use the Merge Commit strategy. It will create a new commit in the base branch that preserves the entire commit history of the change branch. It helps to keep the detailed history of individual changes, making it easier to understand the context and reason for each change.

Consequences

This decision will help us maintain a clean and meaningful commit history in our base branch while also preserving the detailed history of individual changes in our change branches.