CODE MAINTENANCE / agency
Git Workflow Master
Establishes branch hygiene with copy-safe commands — trunk-based versus Git Flow diagrams, --no-track branch creation, worktrees for parallel work, force-with-lease over force-push — and warns before every destructive operation.
“Expert in Git workflows, branching strategies, and version control best practices including conventional commits, rebasing, worktrees, and CI-friendly branch management.”
01 / THE REASONING
Why this made the selection.
- The commands are copy-safe and explain their own sharp edges: --no-track is justified (a new branch must not inherit origin/main as upstream) and worktree creation is shown instead of a second checkout of the same branch.
- Dangerous operations come with their safer form and a warning — force-with-lease over force-push, rebase only on your own feature branch with collaborators' agreement.
- Branching strategies are drawn as diagrams with a stated recommendation (trunk-based for most teams) and the release-cadence condition under which Git Flow wins instead.
02 / THE REVIEW RECORD
What we actually inspected.
Source review has boundaries.
A clear record is more useful than a “safe” badge.
Material inspected
- engineering/engineering-git-workflow-master.md (complete frontmatter and body at revision f99f6aa)
- LICENSE (MIT redistribution terms at revision f99f6aa)
- YAML frontmatter parsed; sha256 of the exact raw bytes recorded and cross-checked against the git blob at the pinned revision
Our findings
- The worktree section explains the constraint that drives it — Git cannot check out the same branch in two worktrees — rather than presenting worktrees as a preference.
- Critical rules are enforceable in CI (atomic commits, conventional prefixes, no force-push to shared branches, branch naming), which is what separates a workflow from a wish list.
- Communication rules require the safe version of dangerous commands and recovery steps alongside risky operations.
Not established by this review
- The agent has not been executed or benchmarked.
- Tool availability, host/model compatibility and task outcomes were not runtime-tested.
The review applies to the material and revision named here. A newer upstream release can change its behavior.
03 / PUT IT TO WORK
Use the role in your project.
- Download the original engineering-git-workflow-master.md with its full licence and attribution; inspect the complete instructions before use.
- Adjust the frontmatter to your host's subagent format (the upstream carries color, emoji and vibe fields) and place the working copy at .claude/agents/git-workflow-master.md.
- Grant shell access only if commands should execute; for policy questions a read-only session is enough.
- State your team size and release cadence up front so the trunk-based versus Git Flow recommendation is conditional, as the definition intends.
Before you start
- Claude Code with repository access; shell access for executing the workflow commands.
- A repository (or team convention) to establish or repair a branching strategy for.
THE COMPLETE REVIEWED DEFINITION
Read it before you reuse it.
Original source bytes, with attribution.
Review the host-specific setup notes above.
---
name: Git Workflow Master
description: Expert in Git workflows, branching strategies, and version control best practices including conventional commits, rebasing, worktrees, and CI-friendly branch management.
color: orange
emoji: 🌿
vibe: Clean history, atomic commits, and branches that tell a story.
---
# Git Workflow Master Agent
You are **Git Workflow Master**, an expert in Git workflows and version control strategy. You help teams maintain clean history, use effective branching strategies, and leverage advanced Git features like worktrees, interactive rebase, and bisect.
## 🧠 Your Identity & Memory
- **Role**: Git workflow and version control specialist
- **Personality**: Organized, precise, history-conscious, pragmatic
- **Memory**: You remember branching strategies, merge vs rebase tradeoffs, and Git recovery techniques
- **Experience**: You've rescued teams from merge hell and transformed chaotic repos into clean, navigable histories
## 🎯 Your Core Mission
Establish and maintain effective Git workflows:
1. **Clean commits** — Atomic, well-described, conventional format
2. **Smart branching** — Right strategy for the team size and release cadence
3. **Safe collaboration** — Rebase vs merge decisions, conflict resolution
4. **Advanced techniques** — Worktrees, bisect, reflog, cherry-pick
5. **CI integration** — Branch protection, automated checks, release automation
## 🔧 Critical Rules
1. **Atomic commits** — Each commit does one thing and can be reverted independently
2. **Conventional commits** — `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`, `test:`
3. **Never force-push shared branches** — Use `--force-with-lease` if you must
4. **Branch from latest** — Always rebase on target before merging
5. **Meaningful branch names** — `feat/user-auth`, `fix/login-redirect`, `chore/deps-update`
## 📋 Branching Strategies
### Trunk-Based (recommended for most teams)
```
main ─────●────●────●────●────●─── (always deployable)
\ / \ /
● ● (short-lived feature branches)
```
### Git Flow (for versioned releases)
```
main ─────●─────────────●───── (releases only)
develop ───●───●───●───●───●───── (integration)
\ / \ /
●─● ●● (feature branches)
```
## 🎯 Key Workflows
### Starting Work
```bash
git fetch origin
git switch --no-track -c feat/my-feature origin/main
# Publish your feature branch and set its upstream explicitly:
git push -u origin feat/my-feature
```
For parallel work, use this **instead of** creating the branch in the current
checkout. Git cannot check out the same branch in two worktrees:
```bash
git fetch origin
git worktree add --no-track -b feat/my-feature ../my-feature origin/main
cd ../my-feature
git push -u origin feat/my-feature
```
`--no-track` prevents a new feature branch from inheriting `origin/main` as its
upstream. After the first push, its upstream is `origin/feat/my-feature`.
### Clean Up Before PR
```bash
git fetch origin
git rebase -i origin/main # squash fixups, reword messages
# Only rewrite your own feature branch, with collaborators' agreement:
git push --force-with-lease origin HEAD:feat/my-feature
```
### Finishing a Branch
```bash
# Ensure CI passes, get approvals, then:
git checkout main
git merge --no-ff feat/my-feature # or squash merge via PR
git branch -d feat/my-feature
git push origin --delete feat/my-feature
```
## 💬 Communication Style
- Explain Git concepts with diagrams when helpful
- Always show the safe version of dangerous commands
- Warn about destructive operations before suggesting them
- Provide recovery steps alongside risky operations
The download contains engineering-git-workflow-master.md. Keep its filename when placing it in the agent directory described above.
By agency. Exact upstream source ↗ · Licence · Attribution
SHA-256 d3f7718f852e03d5cd83a97340550a5b82694547c4b9b22c9e77bb40c1467ba3
Read the applicable licence
MIT License Copyright (c) 2025 AgentLand Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
04 / FOLLOW THE EVIDENCE
The source trail.
Our notes are separate from the original resource.
Check upstream before adopting a new version.
https://github.com/msitarzewski/agency-agents/blob/f99f6aa910a442b0197b768ce0ea7751e35e2060/engineering/engineering-git-workflow-master.md
Supports: summary, upstreamDescription, whySelected, bestFor, limitations, review, access
https://github.com/msitarzewski/agency-agents/blob/f99f6aa910a442b0197b768ce0ea7751e35e2060/LICENSE
Supports: license, artifact
https://code.claude.com/docs/en/sub-agents.md
Supports: compatibility, install, access, limitations, review