Git Flow Branching Model β Implemented with pure Git, no additional tools required
A Claude Code skill that helps you follow the Git Flow workflow. Supports custom branch names, interactive operations, and is fully portable.
npx skills add https://github.com/hughedward/gitflow-skills --skill gitflow# Clone the repository
git clone https://github.com/hughedward/gitflow-skills.git /tmp/gitflow-skills
# Copy the skill to your Claude Code skills directory
mkdir -p ~/.agents/skills
mkdir -p ~/.claude/skills
cp -r /tmp/gitflow-skills/skills/gitflow ~/.agents/skills
ln -s ~/.agents/skills/gitflow ~/.claude/skills/
# Done! Type /gitflow in Claude Code to use itType in Claude Code:(All you need to do)
/gitflow [balabala]
The skill will guide you through Git Flow operations.
You can optionally configure a .gitflow file in your project root:
# Git Flow Configuration
# This file is generated by setup_gitflow.sh
# Modify these values to customize your branch names
[gitflow "branch"]
master = main
develop = develop
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/| Feature | Description |
|---|---|
| Pure Git Implementation | No need to install git-flow-avh or other tools |
| Interactive Menu | Friendly command-line interface, no need to memorize complex commands |
| Custom Configuration | Support for custom branch names (e.g., dev instead of develop) |
| Status Visualization | Understand your Git Flow status at a glance |
| Regression Testing | Built-in test suite to ensure script reliability |
Official documentation: https://nvie.com/posts/a-successful-git-branching-model/
# Ensure main branch exists
git checkout main
# Create develop branch
git checkout -b develop
# Push to remote
git push -u origin main
git push -u origin developOr use the helper script:
bash ~/.claude/skills/gitflow/scripts/setup_gitflow.sh# Create feature branch from develop
git checkout develop
git checkout -b feature/user-auth
# ... develop code ...
# Merge back to develop when done
git checkout develop
git merge --no-ff feature/user-auth
git branch -d feature/user-auth# Create release branch from develop
git checkout develop
git checkout -b release/1.0.0
# ... release preparation ...
# Merge to main and tag
git checkout main
git merge --no-ff release/1.0.0
git tag -a 1.0.0 -m "Release version 1.0.0"
# Merge back to develop
git checkout develop
git merge --no-ff release/1.0.0
git branch -d release/1.0.0
# Push tags
git push origin main
git push origin develop
git push origin 1.0.0# Create hotfix branch from main
git checkout main
git checkout -b hotfix/1.0.1
# ... fix bug ...
# Merge to main and tag
git checkout main
git merge --no-ff hotfix/1.0.1
git tag -a 1.0.1 -m "Hotfix version 1.0.1"
# Merge back to develop
git checkout develop
git merge --no-ff hotfix/1.0.1
git branch -d hotfix/1.0.1Just type in Claude Code: Let the skill handle the rest
/gitflow
π¦:π
| Script | Purpose |
|---|---|
setup_gitflow.sh |
Initialize Git Flow repository |
gitflow_helper.sh |
Interactive operation menu |
gitflow_status.sh |
Display current Git Flow status |
| Branch | Purpose | Source | Merge To |
|---|---|---|---|
main / master |
Production | - | - |
develop |
Development integration | main |
- |
feature/* |
New feature development | develop |
develop |
release/* |
Release preparation | develop |
develop, main |
hotfix/* |
Production emergency fixes | main |
develop, main |
Git Flow is a branching model strategy proposed by Vincent Driessen.
https://nvie.com/posts/a-successful-git-branching-model/
Core concept: Git Flow is a set of branch management conventions, not a specific tool. Understanding the underlying Git commands allows you to use it in any environment without depending on additional software.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Git Flow Philosophy β Implemented with native git β β
β Git Flow Tool β Optional, not required (optional) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The .gitflow configuration file in the project root stores branch naming preferences:
[gitflow "branch"]
master = main
develop = develop
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/All helper scripts will automatically read and respect this configuration.
- Git 2.0+
- Bash 4.0+
Q: Do I need to install git-flow-avh tool?
A: No. This skill implements all features using pure Git commands.
Q: Can I customize branch names?
A: Yes. Modify the .gitflow configuration file.
Q: What if develop branch doesn't exist?
A: Run git checkout main && git checkout -b develop to create it.
Issues and Pull Requests are welcome!