Skip to content

Add release branch command for direct merge-and-tag without release branch lifecycle #77

@alexrinass

Description

@alexrinass

Add a git flow release branch <version> [<name>] command that merges a branch directly into main and tags it, without creating an intermediate release branch. This was available in git-flow-avh as git flow release branch.

Use Case

When release preparation is already done on develop (or another branch) and there's no need for a dedicated release branch, this command provides a shortcut to go straight to "merge into main and tag."

Proposed Behavior

# Merge develop into main and tag as v2.0.0
git flow release branch 2.0.0

# Merge a specific branch into main and tag
git flow release branch 2.0.0 some-branch

The command would:

  1. Merge the source branch (defaults to develop) into main
  2. Create a tag with the given version on main
  3. Not create, back-merge into develop, or delete any branch

Validations

  • Source branch must exist
  • Source branch must not be a git-flow prefixed branch (e.g., feature/foo)
  • Source branch must not be main itself

Flags

Same tag/merge flags as release finish: --fetch, --sign, --signingkey, --message, --messagefile, --notag, --squash.

git-flow-avh Reference

This mirrors cmd_branch() in git-flow-avh's git-flow-release (lines 763-919).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions