git-workflow

Guide three-tier Git branching with main, staging, and feature branches.

Updated Jun 12, 2025
One-click install
npx skills add https://github.com/alirezamohammadpoor/zone2run --skill git-workflow-alirezamohammadpoor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow
Source: https://github.com/alirezamohammadpoor/zone2run/tree/main/.claude/skills/git
Command: npx skills add https://github.com/alirezamohammadpoor/zone2run --skill git-workflow-alirezamohammadpoor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a structured and efficient Git branching strategy to manage code development, integration, and deployment, preventing common merge conflicts and ensuring a clean production history.

Core Features & Use Cases

  • Three-Tier Branching: Enforces a mainstagingfeature/* model for clear code progression.
  • Streamlined Workflows: Offers commands for starting features, syncing code, preparing for Pull Requests (PRs), and deploying to production.
  • Use Case: When starting a new feature, use git feature <name> to create a branch from the latest staging. Throughout development, use git sync to keep your feature branch updated with staging, and before creating a PR, clean up your commits with interactive rebase.

Quick Start

Use the git skill to create a new feature branch named 'user-auth' from the latest staging branch.

Frequently Asked Questions about git-workflow

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

FAQPage Schema
What is the best Git branching strategy for managing staging and production deployments?

To create a feature branch, run the command to branch directly from the latest staging environment. This ensures your new development work starts with the most recently integrated code, preventing integration drift and reducing merge conflicts later in the cycle.

How do I keep my feature branch updated with staging without messy merge commits?

You can synchronize your feature branch with staging by using a rebase workflow. Rebasing replays your local commits on top of the updated staging branch, ensuring a linear, clean project history without introducing unnecessary merge commit artifacts.

How should I clean up Git commits before submitting a Pull Request?

You should clean up commits using interactive rebase before preparing a Pull Request. This allows you to squash, reorder, or edit commit messages, ensuring your PR history remains concise and comprehensible for reviewers evaluating the feature integration.

Can I handle hotfixes directly on the production branch using this branching model?

Yes, this Git workflow supports dedicated hotfix workflows for production branches. When critical issues arise, you can apply fixes directly to main and synchronize them back downstream, ensuring rapid deployment without disrupting active feature development.

How do I resolve merge conflicts when rebasing feature branches?

During synchronization via rebasing, the workflow provides structured conflict resolution processes. When conflicts occur, you resolve them directly in your local environment, allowing the rebase to continue and ensuring the feature branch integrates cleanly with staging.