Skip to content
Back to skills

Promoting Dev To Main

ASecurity

Use when preparing, reviewing, resolving conflicts for, or merging a CORAL release pull request from the long-lived dev branch into main.

  • 1,003 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added August 31, 2026
ai-agentsbashgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned August 31, 2026

npx -y skills add Human-Agent-Society/CORAL --skill promoting-dev-to-main --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Promoting Dev To Main?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Promoting Dev To Main
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/human-agent-society-promoting-dev-to-main/badge)](https://www.skillsdirectory.com/skills/human-agent-society-promoting-dev-to-main)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: promoting-dev-to-main
description: Use when preparing, reviewing, resolving conflicts for, or merging a CORAL release pull request from the long-lived dev branch into main.
---

# Promoting dev to main

## Core rule

Merge `dev → main` release PRs with a **merge commit**. Never squash or rebase
these promotions.

Ordinary contribution PRs still target `dev` and may be squash-merged. The
release promotion is the exception because `main` must retain `dev` in its
ancestry. Squashing a promotion makes the next release re-present old commits
and can create large false conflicts.

## Workflow

1. Confirm the PR is exactly `base=main`, `head=dev` and no duplicate release
   PR is open.
2. Review `main..dev`, required CI, and deployment checks.
3. In GitHub, open the merge-method dropdown and choose **Create a merge
   commit**. With the CLI, use:

   ```bash
   gh pr merge <number> --repo Human-Agent-Society/CORAL --merge
   ```

4. Keep the long-lived `dev` branch. Do not delete or force-push it.
5. Fetch both branches and verify the released `dev` tip is an ancestor of
   `main`:

   ```bash
   git fetch origin dev main
   git merge-base --is-ancestor origin/dev origin/main
   ```

   Exit status `0` is required.
6. Confirm post-merge CI, release automation, deployments, and production
   smoke checks.

## If GitHub reports conflicts

Do not force-rebase the shared `dev` branch. First inspect the topology and
reproduce conflicts with `git merge-tree`.

If an earlier release was squash-merged, `main` may have the same tree as an
earlier `dev` commit without sharing its ancestry. Verify tree equivalence
before choosing a repair. Prefer merging `main` back into `dev` and pushing
normally; use an ancestry-only `ours` merge only when exact tree equality
proves `main` contains no unique content to preserve.

## Red flags

- GitHub's primary button says **Squash and merge**.
- A command uses `--squash`, `--rebase`, or a force-push.
- The release workflow proposes deleting `dev`.
- Conflict resolution starts before checking commit topology and tree equality.

Stop when any red flag appears and return to the workflow above.

## Quick reference

| PR | Allowed merge method |
|---|---|
| Feature/fix/docs branch → `dev` | Repository default; usually squash |
| `dev` → `main` release promotion | Merge commit only |

Files in this skill

  • SKILL.md2.3 KB
  • agents/openai.yaml216 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.