finishing-a-development-branch

Guide merge, PR, or discard decisions for completed development branches.

2|1|Updated May 1, 2026
One-click install
npx skills add https://github.com/LeonardoTan19/metaforge --skill finishing-a-development-branch-leonardotan19
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/LeonardoTan19/metaforge/tree/main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/LeonardoTan19/metaforge --skill finishing-a-development-branch-leonardotan19

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers and teams to finish development work on a feature branch by ensuring tests pass, correctly identifying the base branch, and offering structured finish options to merge, create a PR, or discard, followed by cleanup.

Core Features & Use Cases

  • Tests verification before finishing: ensures CI results are green before any final actions.
  • Base-branch determination: detects main or master as the safe merge target.
  • Structured finish options: four explicit choices: merge locally, push and create PR, keep the branch as-is, or discard the work.
  • End-to-end cleanup: performs branch cleanup and worktree maintenance after completion.
  • Use case: when a feature branch is ready, tests pass, and the team wants a clear path to integrate or remove the feature.

Quick Start

After confirming tests pass, choose one of the four finish options to finalize the work and clean up the branch.

Frequently Asked Questions about finishing-a-development-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I finalize a development branch after CI tests pass?

To finalize a development branch after CI tests pass, you verify the green test results, determine the correct base branch, and select from four structured finish options to merge or discard the work.

What is the best way to merge a feature branch locally or create a pull request?

The best way to merge a feature branch or create a pull request is to use a deterministic workflow that detects your base branch and presents explicit finish options, ensuring you choose the correct integration path.

How does branch cleanup work after merging a feature branch?

Branch cleanup after merging involves executing the chosen finish action and then performing end-to-end worktree maintenance to safely remove the completed feature branch from your local environment.

Can I keep a development branch as-is instead of merging it immediately?

Yes, you can keep a development branch as-is by selecting the corresponding finish option, which pauses the merge process while preserving your current work without triggering local merge or pull request actions.

How do I ensure CI tests are green before finishing a git workflow branch?

Ensuring CI tests are green before finishing a git workflow branch requires a verification step that checks test results, preventing any final merge or pull request actions until the CI passes.

When should I discard work on a feature branch instead of merging it?

You should discard work on a feature branch instead of merging when the feature is no longer needed, utilizing the discard finish option to remove the work and execute proper branch cleanup.