Greetings, battle-hardened code warrior! You have survived the introductory enchantments of branching and the clean-commit oath. But the realm of version control runs far deeper than a single git push. Today you face the Grand Merge Ritual โ€” a trial reserved for those who would command entire release kingdoms, orchestrate fleets of pull requests, and bend the timeline of code to their will.

In this quest you will study real pull requests from an active open-source repository and learn the advanced arts of semantic versioning, branch orchestration, automated changelogs, and CI/CD-driven releases. The spells you forge here are the same ones used by maintainers of the worldโ€™s most critical software.

๐ŸŒŸ The Legend Behind This Quest

Long ago, the Great Repository fell into chaos. Features collided, hotfixes overwrote releases, and the changelog โ€” the sacred chronicle of change โ€” went blank for months. It took a council of senior engineers, armed with conventional commits, semantic versions, and automated pipelines, to restore order. Their techniques were codified into the Grand Merge Ritual, and now they are yours to learn.


๐ŸŽฏ Quest Objectives

By the time you complete this epic journey, you will have mastered:

Primary Objectives (Required for Quest Completion)

Secondary Objectives (Bonus Achievements)

Mastery Indicators

Youโ€™ll know youโ€™ve truly mastered this quest when you can:

๐Ÿ—บ๏ธ Quest Prerequisites

๐Ÿ“‹ Knowledge Requirements

๐Ÿ› ๏ธ System Requirements


๐Ÿ—บ๏ธ Quest Network Position

graph TB
    subgraph "Prerequisites"
        Branches["๐ŸŒฑ Branches & PRs<br/>Level 0010"]
        Commits["๐ŸŒฑ Clean Commits<br/>Level 0010"]
        Changelogs["๐Ÿ“œ Change Logs<br/>Level 0010"]
    end

    subgraph "Current Quest"
        Main["๐Ÿ”ด Mastering Version<br/>Control Workflows<br/>Level 1100"]
    end

    subgraph "Unlocked Adventures"
        CICD["๐Ÿฐ CI/CD Pipeline<br/>Mastery"]
        Maintainer["๐Ÿ‘‘ Open-Source<br/>Maintainer Epic"]
    end

    Branches --> Main
    Commits --> Main
    Changelogs -.-> Main
    Main --> CICD
    Main --> Maintainer

๐Ÿง™โ€โ™‚๏ธ Chapter 1: The Semantic Versioning Codex

Before touching a single branch, every master architect must understand the language of versions. Semantic Versioning (SemVer) is the universal tongue that tells the world what your changes mean.

โš”๏ธ The Three Sacred Numbers

MAJOR . MINOR . PATCH
  โ†‘        โ†‘       โ†‘
  โ”‚        โ”‚       โ””โ”€โ”€ Bug fixes, chores โ€” backward compatible
  โ”‚        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ New features โ€” backward compatible
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Breaking changes โ€” contracts change

๐Ÿ”ฎ Commit-to-Version Mapping

Every conventional commit carries a version destiny:

Commit Prefix SemVer Bump Example Version Change
fix: PATCH โ†‘ fix: prevent crash on empty input 1.0.0 โ†’ 1.0.1
chore: PATCH โ†‘ chore(deps): upgrade axios 1.0.0 โ†’ 1.0.1
docs: PATCH โ†‘ docs: update API examples 1.0.0 โ†’ 1.0.1
feat: MINOR โ†‘ feat: add dark mode toggle 1.0.0 โ†’ 1.1.0
BREAKING CHANGE: MAJOR โ†‘ Footer in any commit 1.0.0 โ†’ 2.0.0

๐Ÿ—๏ธ Real-World Example: PR #169

Letโ€™s examine a real bug fix from the IT-Journey repository:

PR #169 โ€” fix(validator): skip required field checks for fields with _config.yml defaults

# The commit that would trigger this:
fix(validator): skip required field checks for fields with _config.yml defaults

๐Ÿ” Knowledge Check: SemVer


๐Ÿง™โ€โ™‚๏ธ Chapter 2: The Branch Strategy War Room

Not all branches are created equal. A master architect knows which type of branch to summon for every situation โ€” and more importantly, when to merge them and in what order.

โš”๏ธ The Advanced Branch Arsenal

Branch Type Naming Convention Purpose Merges Into SemVer Impact
feature/ feat/short-description New capabilities main MINOR
bugfix/ fix/short-description Non-urgent fixes main PATCH
hotfix/ hotfix/short-description Urgent production fixes main PATCH
refactor/ refactor/short-description Code reorganization main PATCH (no behavior change)
release/ release/vX.Y.Z Prepare versioned release main Tagged release
automated/ automated/workflow-name Bot-generated changes main PATCH

๐Ÿ—๏ธ Real-World Branch Anatomy: The Five Open PRs

Letโ€™s dissect every open PR in the IT-Journey repo and classify them:

๐Ÿ”ง PR #169 โ€” Bug Fix Branch

fix/validator-config-defaults โ†’ main

โœจ PR #168 โ€” Feature Branch (with dependency)

feat/quest-content-updates โ†’ main

โœจ PR #167 โ€” Feature Branch (foundation)

feat/contributor-profile-system โ†’ main

๐Ÿ”„ PR #166 โ€” Refactor Branch

refactor/relocate-generation-scripts โ†’ main

๐Ÿค– PR #163 โ€” Automated Branch

automated/organize-posts-23102108538 โ†’ main

๐Ÿงช The PR Dependency Graph

graph LR
    subgraph "Independent โ€” Can merge in any order"
        PR169["๐Ÿ”ง #169<br/>fix/validator-config-defaults"]
        PR166["๐Ÿ”„ #166<br/>refactor/relocate-generation-scripts"]
        PR163["๐Ÿค– #163<br/>automated/organize-posts"]
    end

    subgraph "Dependent โ€” Must merge in order"
        PR167["โœจ #167<br/>feat/contributor-profile-system"]
        PR168["โœจ #168<br/>feat/quest-content-updates"]
    end

    PR167 -->|"must land before"| PR168

    style PR169 fill:#90EE90
    style PR166 fill:#87CEEB
    style PR163 fill:#DDA0DD
    style PR167 fill:#FFD700
    style PR168 fill:#FFD700

โšก Quick Win: Classify Any Change

Before creating a branch, ask yourself:

  1. Does it add something new? โ†’ feature/
  2. Does it fix broken behavior? โ†’ bugfix/ or hotfix/ (if urgent)
  3. Does it reorganize without changing behavior? โ†’ refactor/
  4. Is it generated by a bot? โ†’ automated/
  5. Does it prepare a tagged release? โ†’ release/

๐Ÿ” Knowledge Check: Branch Strategy


๐Ÿง™โ€โ™‚๏ธ Chapter 3: The Art of the Pull Request Scroll

A pull request is not just a code diff โ€” itโ€™s a communication artifact. The best PRs tell a story: what changed, why it changed, how to verify it, and what it affects downstream.

โš”๏ธ Anatomy of a Master-Class PR Description

Letโ€™s study PR #169โ€™s description โ€” itโ€™s a model of clarity:

## Description
Updates quest_validator.py to respect Jekyll _config.yml default values,
preventing false validation failures for fields that have defaults set
at the collection level.

## Changes Made
- Added --config / -c CLI argument to specify config file path
- Auto-detects _config.yml if not explicitly provided
- Parses defaults section to find collection-scoped default fields
- Handles YAML anchors/aliases via regex fallback parser
- Skips required field errors for fields that have config defaults (e.g., layout)

## Type of Change
- [x] Bug fix (non-breaking change fixing an issue)

## Testing
- 142/142 quests pass validation with -c _config.yml
- No false positives for fields with config-level defaults

๐Ÿ“œ The Five Runes of an Excellent PR

Rune Purpose PR #169 Example
๐Ÿง™ Description What and why in plain language โ€œPreventing false validation failuresโ€
๐Ÿ“ Changes Made Bullet list of specific modifications 5 clear, scannable bullets
๐Ÿท๏ธ Type of Change Checkbox classification Bug fix checked
๐Ÿงช Testing Proof it works โ€œ142/142 quests passโ€
๐Ÿ”— Dependencies Other PRs that must merge first (See PR #168 โ†’ depends on #167)

๐Ÿ—๏ธ PR Description Patterns by Type

Feature PR (like #167):

## Description
Adds a complete contributor profile system with gamified RPG elements
including character sheets, achievement walls, and stats panels.

## Changes Made
- Data layer: _data/contributors/ with YAML profiles and template
- Display components: _includes/contributor/ (character_sheet, stats_panel,
  profile_card, achievement_wall)
- Contributor CSS styling
- Contributor directory and individual pages
- GitHub Actions workflow for updating contributor profiles
- Generation scripts and Makefile targets

## Type of Change
- [x] New feature (non-breaking change adding functionality)

Refactor PR (like #166):

## Description
Moves statistics generation scripts from `_data/` to `scripts/generation/`
for better project organization. Scripts don't belong in the data directory.

## Changes Made
- Relocated generate_statistics.rb, generate_statistics.sh,
  update_statistics.sh to scripts/generation/
- Updated all path references in Makefile, AGENTS.md, _data/README.md,
  scripts/README.md, pages/stats.md, and stating-the-stats quest
- Removed obsolete files

## Type of Change
- [x] Refactoring (no behavior change)

## Testing
- [x] `make test` passes with new paths
- [x] Script syntax checks pass

๐Ÿงช Challenge 1: Write a PR Description (๐Ÿ• 15 minutes)

Youโ€™ve just finished a feature that adds dark mode to the site. Write a complete PR description using the five runes above.

Requirements:


๐Ÿง™โ€โ™‚๏ธ Chapter 4: Release Orchestration โ€” The Grand Ritual

The most powerful spell in the version control codex is the release. It transforms a stream of commits into a versioned artifact that the world can depend on.

โš”๏ธ The Release Lifecycle

graph TD
    A["๐Ÿ”ง Merge PRs to main"] --> B["๐Ÿ“‹ Review commit history"]
    B --> C{"๐Ÿ”ฎ Determine version bump"}
    C -->|"Has feat:"| D["MINOR bump"]
    C -->|"Only fix:/chore:"| E["PATCH bump"]
    C -->|"Has BREAKING CHANGE:"| F["MAJOR bump"]
    D --> G["๐Ÿ“ Generate CHANGELOG"]
    E --> G
    F --> G
    G --> H["๐Ÿท๏ธ Create Git tag"]
    H --> I["๐Ÿš€ Create GitHub Release"]
    I --> J["๐Ÿ“ข Deploy & announce"]

๐Ÿ—๏ธ Planning a Release from the Open PRs

Imagine all five open PRs have been reviewed and approved. Letโ€™s plan the release:

Step 1: Determine merge order

1. PR #163 (automated/organize-posts)     โ€” independent, safe to merge first
2. PR #166 (refactor/relocate-scripts)     โ€” independent, no behavior change
3. PR #169 (fix/validator-config-defaults) โ€” independent bug fix
4. PR #167 (feat/contributor-profiles)     โ€” foundation feature, must precede #168
5. PR #168 (feat/quest-content-updates)    โ€” depends on #167

Step 2: Calculate the version bump

Current version: v1.5.0 (hypothetical)

Commits entering main:
  - chore: automated post organization    โ†’ PATCH
  - refactor: relocate generation scripts โ†’ PATCH
  - fix: validator config defaults        โ†’ PATCH
  - feat: contributor profile system      โ†’ MINOR โ† highest non-breaking
  - feat: quest content updates           โ†’ MINOR

Highest impact: feat: โ†’ MINOR bump
New version: v1.6.0

Step 3: Generate the changelog

# Changelog

## [1.6.0] - 2026-03-21

### Added
- feat(contributors): add contributor profile system with RPG character sheets (#167)
- feat(quests): add contributor quest line and rewrite bash-run quest (#168)

### Fixed
- fix(validator): skip required field checks for fields with _config.yml defaults (#169)

### Changed
- refactor(scripts): relocate generation scripts from _data/ to scripts/generation/ (#166)

### Maintenance
- chore: weekly post organization and archiving (#163)

๐Ÿ› ๏ธ Hands-On: Automated Releases with standard-version

# Install the release automation tool
npm install --save-dev standard-version

# Add release scripts to package.json
# "scripts": {
#   "release": "standard-version",
#   "release:minor": "standard-version --release-as minor",
#   "release:patch": "standard-version --release-as patch",
#   "release:major": "standard-version --release-as major"
# }

# Dry run โ€” see what would happen without committing
npx standard-version --dry-run

# Execute the release
npx standard-version

# Push the tag
git push --follow-tags origin main

๐Ÿท๏ธ Creating a GitHub Release

# Create a release from the latest tag
gh release create v1.6.0 \
  --title "v1.6.0 โ€” Contributor Profiles & Validation Fixes" \
  --notes-file CHANGELOG.md \
  --target main

# Or auto-generate release notes from PRs
gh release create v1.6.0 --generate-notes

๐Ÿ” Knowledge Check: Release Management


๐Ÿง™โ€โ™‚๏ธ Chapter 5: Conflict Resolution โ€” The Battle of the Branches

When two branches modify the same lines of code, Git summons you to settle the dispute. Conflict resolution is not a failure โ€” it is a rite of passage.

โš”๏ธ When Conflicts Strike

Imagine PR #166 (refactor scripts) and PR #169 (fix validator) both modify Makefile references. When you merge one, the other will conflict.

# After merging PR #166, rebase PR #169 onto updated main
git switch fix/validator-config-defaults
git fetch origin main
git rebase origin/main

# Git pauses at the conflict:
# CONFLICT (content): Merge conflict in Makefile

๐Ÿ› ๏ธ Resolving the Conflict

# 1. Open the conflicted file โ€” look for conflict markers
<<<<<<< HEAD
STATS_SCRIPT = scripts/generation/generate_statistics.sh
=======
STATS_SCRIPT = _data/generate_statistics.sh
>>>>>>> fix/validator-config-defaults

# 2. Choose the correct version (PR #166 already relocated the scripts)
STATS_SCRIPT = scripts/generation/generate_statistics.sh

# 3. Remove ALL conflict markers (<<<, ===, >>>)

# 4. Stage and continue
git add Makefile
git rebase --continue

# 5. Force-push the rebased branch (only YOUR branch, never main!)
git push --force-with-lease origin fix/validator-config-defaults

โšก The Golden Rules of Conflict Resolution

  1. Never blindly accept one side โ€” read both changes and understand intent
  2. Use --force-with-lease โ€” safer than --force, prevents overwriting othersโ€™ work
  3. Rebase feature branches onto main โ€” donโ€™t merge main into your feature branch
  4. Test after resolving โ€” conflicts can introduce subtle bugs
  5. Communicate with the other author โ€” if unsure whose code should win, ask

๐Ÿงช Challenge 2: Simulate a Merge Conflict (๐Ÿ• 20 minutes)

Practice conflict resolution in a safe sandbox:

# Create a practice repo
mkdir conflict-practice && cd conflict-practice
git init

# Create a base file
echo "line 1: hello" > greetings.txt
echo "line 2: world" >> greetings.txt
git add . && git commit -m "feat: initial greetings"

# Branch A: changes line 2
git switch -c feature/formal-greeting
sed -i '' 's/world/esteemed colleague/' greetings.txt
git add . && git commit -m "feat: formal greeting"

# Branch B: also changes line 2
git switch main
git switch -c feature/casual-greeting
sed -i '' 's/world/friend/' greetings.txt
git add . && git commit -m "feat: casual greeting"

# Merge A into main
git switch main
git merge feature/formal-greeting

# Now try merging B โ€” CONFLICT!
git merge feature/casual-greeting
# Resolve it, then commit

Success Criteria:


๐Ÿง™โ€โ™‚๏ธ Chapter 6: Branch Protection and CI Gatekeeping

A kingdom without walls falls to invaders. Branch protection rules are the enchanted walls that guard your main branch from chaos.

โš”๏ธ Essential Protection Rules

Rule Setting Why
Require PR โœ“ No direct commits to main
Require approvals 1-2 reviewers Peer review catches bugs
Require status checks CI must pass Automated quality gate
Require linear history Optional Cleaner git log
Block force pushes โœ“ Protect shared history

๐Ÿ› ๏ธ Setting Up Branch Protection

# Using GitHub CLI to configure branch protection
gh api repos/{owner}/{repo}/branches/main/protection \
  --method PUT \
  --field required_status_checks='{"strict":true,"contexts":["ci/build","ci/test"]}' \
  --field enforce_admins=true \
  --field required_pull_request_reviews='{"required_approving_review_count":1}'

๐Ÿค– CI Status Checks in Action

Every PR in the IT-Journey repo must pass automated checks before merging. For example, PR #169 added validation that proves 142/142 quests pass โ€” thatโ€™s a status check in action.

# Example: .github/workflows/pr-checks.yml
name: PR Quality Gate
on: [pull_request]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Validate quest frontmatter
        run: python3 test/quest-validator/quest_validator.py -d pages/_quests/

      - name: Check for broken links
        run: python3 scripts/link-checker.py --scope internal

      - name: Build Jekyll site
        run: |
          bundle install
          bundle exec jekyll build

๐Ÿ” Knowledge Check: Branch Protection


๐ŸŽฎ Quest Implementation Challenges

Challenge 3: Orchestrate a Multi-PR Release (๐Ÿ• 45 minutes)

Simulate the full release workflow using the five open PRs as your model.

Setup: Create a practice repository with five branches mirroring the PR types:

mkdir release-practice && cd release-practice
git init
echo '{"version": "1.5.0"}' > package.json
echo "# My Project" > README.md
git add . && git commit -m "chore: initial commit"

# Create the five branches
git switch -c automated/organize-posts
echo "Posts organized" >> README.md
git add . && git commit -m "chore: weekly post organization"
git switch main

git switch -c refactor/relocate-scripts
mkdir -p scripts/generation
echo "#!/bin/bash" > scripts/generation/generate.sh
git add . && git commit -m "refactor(scripts): relocate generation scripts"
git switch main

git switch -c fix/validator-defaults
echo "validator fixed" >> README.md
git add . && git commit -m "fix(validator): skip checks for config defaults"
git switch main

git switch -c feat/contributor-profiles
echo "profiles system" >> README.md
git add . && git commit -m "feat(contributors): add contributor profile system"
git switch main

git switch -c feat/quest-updates
echo "new quests" >> README.md
git add . && git commit -m "feat(quests): add contributor quest line"
git switch main

The Mission:

๐Ÿ† Master Challenge: Real Repository Contribution (๐Ÿ• 60 minutes)

Apply everything youโ€™ve learned to the actual IT-Journey repository:

  1. Fork the repository: gh repo fork bamr87/it-journey
  2. Create a branch with the correct naming convention for your change
  3. Make a meaningful contribution (fix a typo, improve documentation, or enhance a quest)
  4. Write conventional commits that would produce correct SemVer bumps
  5. Open a PR with a description following the five runes
  6. Link related issues and note any dependencies

Success Criteria:


โœ… Quest Completion Verification

๐Ÿ“‹ Final Checklist

Semantic Versioning:

Branch Strategy:

PR Mastery:

Release Management:

Conflict Resolution:


๐ŸŽ Quest Rewards and Achievements

๐Ÿ† Achievement Badges Earned

โšก Skills and Abilities Unlocked

๐Ÿ› ๏ธ Tools Added to Your Arsenal

๐Ÿ“ˆ Your Journey Progress


๐Ÿ”ฎ Your Next Epic Adventures

๐ŸŒ Skill Web Connections


๐Ÿ“š Quest Resource Codex

๐Ÿ“– Essential Documentation

๐Ÿ”ง Tools and Extensions

๐Ÿ’ฌ Community and Support

Go forth, architect. The branches await your command, the versions await your decree, and the changelog shall record your legend for all time. โš”๏ธ