Skip to content

docs: Establish squash merge strategy for feature/bugfix PRs - #316

Merged
makr-code merged 7 commits into
developfrom
copilot/change-merge-strategy-to-squash
Jan 11, 2026
Merged

makr-code merged 7 commits into
developfrom
copilot/change-merge-strategy-to-squash

Conversation

Copilot AI commented Jan 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

Historical use of merge commits for all PRs cluttered git history with WIP commits. Establishes squash merge as standard for feature/bugfix branches, preserving merge commits only for releases/hotfixes.

Merge Strategy:

  • feature/*, bugfix/* → develop: Squash merge (one commit per logical change)
  • release/*, hotfix/* → main: Merge commit (preserve full history)

Note: Past history cannot be rewritten safely. This applies to future PRs only.

Type of Change

  • 📝 Documentation update
  • 🔧 Configuration change

Related Issues

Addresses team request to improve merge practices going forward.

Changes Made

Core Documentation:

  • Updated CONTRIBUTING.md with merge strategy guidelines and decision matrix
  • Updated .github/pull_request_template.md to recommend squash merge by default
  • Added merge strategy sections to docs/BRANCHING_STRATEGY*.md (German + English)
  • Updated docs/BRANCHING_VISUAL_GUIDE.md with squash merge notation
  • Updated docs/BRANCHING_DOCS_INDEX.md to include new docs

New Documentation:

  • docs/MERGE_STRATEGY_MIGRATION.md - Complete guide, FAQ, explains why retroactive changes aren't feasible
  • docs/GITHUB_SETTINGS_CONFIGURATION.md - Step-by-step GitHub repo configuration
  • docs/MERGE_STRATEGY_QUICK_REF.md - One-page reference for daily use
  • docs/MERGE_STRATEGY_ADMIN_SUMMARY.md - Rollout guide for admins

AI Agent Instructions:

  • Updated AGENTS.md with merge strategy section for AI agents
  • Updated .github/COPILOT_INSTRUCTIONS.md with merge strategy section (German)
  • Fixed broken reference to non-existent COPILOT_INSTRUCTIONS_v2.md file

Testing

Test Environment

  • OS: N/A (documentation only)
  • Compiler: N/A
  • Build Type: N/A

Test Results

  • All existing tests pass
  • New tests added for changes
  • Manual testing performed

Test Commands

# Verification: Links and consistency checks
grep -r "squash" docs/ CONTRIBUTING.md .github/ AGENTS.md
git diff --stat

Checklist

  • My code follows the coding standards
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Code Quality

  • Code builds without errors
  • Code builds without warnings
  • Static analysis (cppcheck) passes
  • No memory leaks detected
  • Code follows C++17 standards

Documentation

  • README.md updated (if applicable)
  • CHANGELOG.md updated
  • API documentation updated (if applicable)
  • Code comments added/updated

Branch Strategy Compliance

  • PR targets the correct branch (develop for features, main for releases/hotfixes)
  • Branch naming follows convention (e.g., feature/, bugfix/, hotfix/, release/)
  • No direct commits to main or develop

Performance Impact

  • No significant performance impact
  • Performance improvement (describe below)
  • Performance regression (justify below)

Performance Notes:
Documentation-only change. No runtime impact.

Breaking Changes

None. Documentation establishes policy for future PRs.

Breaking Change Details:
N/A

Security Considerations

  • No security implications
  • Security review required
  • Dependencies updated to secure versions

Additional Notes

Implementation requires manual GitHub configuration:

  1. Repository admin must configure Settings → Pull Requests → Allow squash merging
  2. Set squash merge as default
  3. Detailed instructions in docs/GITHUB_SETTINGS_CONFIGURATION.md

Impact:

  • 12 files changed: 8 modified, 4 created
  • 980+ lines of documentation added
  • Both German and English versions updated
  • Print-friendly quick references included
  • AI agent instructions updated for consistency
  • Fixed broken documentation link in COPILOT_INSTRUCTIONS.md

Screenshots/Logs

N/A - Documentation changes only


For Maintainers:

Review Checklist

  • Code quality acceptable
  • Tests adequate
  • Documentation complete
  • No security concerns
  • Ready to merge

Merge Strategy

  • Squash and merge (✅ Recommended for feature/bugfix PRs - cleaner history)
  • Merge commit (Only for release/hotfix branches)
  • Rebase and merge
Original prompt

Wir haben in der Vergangenheit sehr viele commit merge gemacht obwohl sqash merge besser gewesen wären. Können wir das nachträglich ändern?


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update merge strategy to squash for past commits docs: Establish squash merge strategy for feature/bugfix PRs Jan 11, 2026
Copilot AI requested a review from makr-code January 11, 2026 11:40
@makr-code

Copy link
Copy Markdown
Owner

@copilot Bitte agents.md und copilot_instructions.md entsprechend anpassen.

Copilot AI commented Jan 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Bitte agents.md und copilot_instructions.md entsprechend anpassen.

Done! Updated both files with merge strategy documentation in commit 62eb411.

AGENTS.md: Added "Merge Strategy for Pull Requests" section with:

  • Merge method table by branch type
  • Guidelines for AI agents creating PRs
  • Links to detailed documentation

.github/COPILOT_INSTRUCTIONS.md: Added "Merge Strategy für Pull Requests" section (German) with:

  • Merge-Strategie overview table
  • Critical importance of PR title/description for squash merges
  • Guidelines and documentation links

@makr-code

Copy link
Copy Markdown
Owner

@copilot COPILOT_INSTRUCTIONS_v2.md kann ich nicht sehen. Existiert die Datei?

Copilot AI commented Jan 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot COPILOT_INSTRUCTIONS_v2.md kann ich nicht sehen. Existiert die Datei?

Nein, die Datei COPILOT_INSTRUCTIONS_v2.md existiert nicht. Das war eine fehlerhafte Referenz in der ursprünglichen COPILOT_INSTRUCTIONS.md.

Behoben in Commit 85f6284:

  • Entfernt: Broken Link zu nicht-existierender COPILOT_INSTRUCTIONS_v2.md
  • Aktualisiert: Link zeigt jetzt auf docs/build-guide/README.md (existiert)
  • Entfernt: Verwirrende Notiz über v1/v2 Versionen

Die Build-Dokumentation ist tatsächlich in docs/build-guide/ verfügbar.

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