Skill Library

intermediate Automation Integration

Git Workflow Expert

Implement professional Git workflows including branching strategies, merge vs rebase decisions, conflict resolution, and team collaboration patterns.

When to Use This Skill

  • Setting up Git workflow for a new team
  • Resolving complex merge conflicts
  • Choosing between branching strategies
  • Cleaning up Git history
  • Recovering from Git mistakes
  • Automating Git operations

How to use this skill

1. Copy the AI Core Logic from the Instructions tab below.

2. Paste it into your AI's System Instructions or as your first message.

3. Provide your raw data or requirements as requested by the AI.

#git#version-control#workflow#collaboration#branching

System Directives

## Curation Note Git workflow decisions impact team productivity and code quality profoundly. This skill synthesizes patterns from obra/superpowers and enterprise engineering teams. The merge vs. rebase guidance addresses one of the most debated topics in software development with a pragmatic "it depends" framework. Understanding when to use each strategy prevents both messy history and dangerous force pushes. ## Branching Strategies ### GitHub Flow (Recommended for Small Teams) ```bash main (always deployable) └── feature/user-auth └── feature/payment-integration └── fix/login-bug 1. Create feature branch from main 2. Commit changes 3. Open PR for review 4. Merge to main 5. Deploy automatically ``` ### GitFlow (For Scheduled Releases) ```bash main (production) └── develop (integration) └── feature/new-feature └── release/1.0.0 └── hotfix/critical-bug 1. Feature branches from develop 2. Merge to develop when complete 3. Release branch for release prep 4. Merge release to main and back to develop 5. Hotfix from main for emergencies ``` ### Trunk-Based Development (For CI/CD) ```bash main (trunk) └── short-lived feature branches (< 2 days) 1. Small, frequent commits to main 2. Feature flags for incomplete features 3. All code is always releasable 4. Short-lived branches for complex changes ``` ## Merge vs. Rebase ```bash git checkout main git merge feature-branch git checkout feature-branch git rebase main ``` ## Conflict Resolution ```bash git merge feature-branch git status <<<<<<< HEAD current branch code ======= incoming branch code >>>>>>> feature-branch git mergetool git add file.txt git commit ``` ## Undo Operations ```bash git reset --soft HEAD~1 git reset --hard HEAD~1 git revert <commit-hash> git reflog git checkout -b recovered-branch <hash> git restore --staged <file> git restore <file> ``` ## Advanced Operations ```bash git rebase -i HEAD~5 git cherry-pick <commit-hash> git bisect start git bisect bad # current commit is bad git bisect good v1.0 # v1.0 was good git branch --merged | grep -v main | xargs git branch -d ``` ## Best Practices 1. **Commit often, push regularly** - Small, atomic commits 2. **Write good commit messages** - Follow conventional commits 3. **Pull before push** - Avoid force pushes 4. **Use .gitignore** - Don't commit artifacts 5. **Protect main branch** - Require reviews 6. **Delete merged branches** - Keep repo clean 7. **Tag releases** - Mark deployment points

Procedural Integration

This skill is formatted as a set of persistent system instructions. When integrated, it provides the AI model with specialized workflows and knowledge constraints for Automation Integration.

Skill Actions


Model Compatibility
🤖 Claude Opus🤖 Gemini 2.5 Pro
Code Execution: Required
MCP Tools: Optional
Footprint ~1,006 tokens