Git Workflow Helper
Commandby davila7 · Added 5mo ago
Claude
Install
npx claude-code-templates@latest --command=cli-tool/templates/common/.claude/commands --yesAdd to Claude
claude mcp add git-workflow-helperAbout
Git Workflow Helper
Manage Git workflows with best practices and common operations.
Purpose
This command helps you perform common Git operations following best practices for collaborative development.
Usage
/git-workflow
What this command does
- Guides through Git operations with proper workflow
- Suggests best practices for commits and branches
- Helps with conflict resolution and merging
- Provides templates for commit messages
- Manages branching strategies (Git Flow, GitHub Flow)
Common Workflows
Feature Development
# Create and switch to feature branch
git checkout -b feature/user-authentication
# Work on your feature
# ... make changes ...
# Stage and commit changes
git add .
git commit -m "feat: add user authentication system
- Implement login/logout functionality
- Add password validation
- Create user session management
- Add authentication middleware"
# Push feature branch
git push -u origin feature/user-authentication
# Create pull request (via GitHub/GitLab interface)
Hotfix Workflow
# Create hotfix branch from main
git checkout main
git checkout -b hotfix/security-patch
# Fix the issue
# ... make changes ...
# Commit the fix
git commit -m "fix: resolve security vulnerability in auth module
- Patch XSS vulnerability in login form
- Update input validation
- Add CSRF protection"
# Push and create urgent PR
git push -u origin hotfix/security-patch
Sync with Remote
# Update main branch
git checkout main
git pull origin main
# Update feature branch with latest main
git checkout feature/your-feature
git rebase main
# OR
git merge main
Commit Message Conventions
Conventional Commits Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Common Types
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style changes (formatting, etc.)
- refactor: Code
Tags
CodeAnalysisaitmplclaude-code-templates