F

Feature Action

Comprehensive command designed for create, flow, feature, branch. Includes structured workflows, validation checks, and reusable patterns for git.

CommandClipticsgitv1.0.0MIT
0 views0 copies

Feature Action

Create and configure a Git Flow feature branch with proper naming, tracking, and development setup.

When to Use This Command

Run this command when you need to:

  • Start a new feature branch following Git Flow conventions from the develop branch
  • Set up a properly named and tracked branch with remote origin configured
  • Initialize a feature workspace with correct branch lineage and push tracking

Consider alternatives when:

  • Your project uses trunk-based development with short-lived branches off main
  • You need a hotfix branch for production which follows a different Git Flow path

Quick Start

Configuration

name: feature-action type: command category: git

Example Invocation

claude command:run feature-action --name "user-dashboard-widgets"

Example Output

Checking repository state...
  Current branch: develop
  Working tree: clean
  Develop is up to date with origin/develop

Creating feature branch...
  Branch: feature/user-dashboard-widgets
  Base: develop (commit a4c8e12)
  Tracking: origin/feature/user-dashboard-widgets

Feature branch ready:
  git checkout feature/user-dashboard-widgets  (already on it)
  Start coding your feature!

Core Concepts

Git Flow Feature Overview

AspectDetails
Base BranchAlways branches from develop, never from main
Namingfeature/descriptive-name following kebab-case convention
Merge TargetMerges back into develop when complete
LifetimeExists until the feature is done, then deleted after merge
CollaborationPushed to origin so multiple developers can work on it

Feature Branch Workflow

main:    ----*-----------*-------->
              \         /
develop:  --*--+--*--*--+--*----->
                \       /
feature:         *--*--*
                 create  merge
                 branch  back

Configuration

ParameterTypeDefaultDescription
namestring(required)Feature name in kebab-case for the branch suffix
basestringdevelopBase branch to create the feature from
pushbooleantruePush feature branch to origin immediately
stash-firstbooleantrueStash uncommitted changes before switching branches
ticketstring(none)Prepend ticket ID to branch name like PROJ-123

Best Practices

  1. Use descriptive feature names - A name like user-dashboard-widgets tells the team exactly what is being built. Avoid vague names like new-stuff that provide no context in branch listings.

  2. Pull develop before branching - Always ensure your local develop branch is up to date with origin before creating the feature branch to avoid starting from a stale base.

  3. Keep features focused - Each feature branch should represent a single deliverable. If the scope grows, split it into multiple feature branches and merge them to develop independently.

  4. Delete after merge - Once the feature is merged back into develop, delete both the local and remote feature branch to keep the repository clean and branch lists manageable.

  5. Rebase regularly - Periodically rebase your feature branch onto develop to incorporate upstream changes and reduce the size of the eventual merge conflict surface.

Common Issues

  1. Develop branch does not exist - Some repositories use main as the integration branch. Set the base parameter to main or create a develop branch first with git checkout -b develop main.

  2. Uncommitted changes block checkout - The command stashes changes by default, but if the stash fails due to untracked files, add them first with git add . or use git stash --include-untracked.

  3. Branch name already exists - If a feature branch with the same name exists from a previous attempt, delete it first with git branch -d feature/old-name or choose a more specific name with an additional qualifier.

  4. Remote push fails with authentication error - If the push to origin fails, verify your SSH key or personal access token is configured correctly. Run git remote -v to confirm the remote URL is using the correct protocol for your authentication method.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates