Basic information
About git-workflow
Git version control workflows, branching strategies, and conflict resolution. Use when managing branches, resolving merge conflicts, understanding git history, or following team git conventions.
git-workflow is an agent skill listed in the AddMCP.net directory, published by agno-agi. Runtime: Python. License: Apache-2.0. The repository has 42,929 GitHub stars. Source code is hosted on github.com. Related topics: agents, ai, ai-agents, developer-tools, python.
Overview
What is git-workflow?
name: git-workflows description: Git version control workflows, branching strategies, and conflict resolution. Use when managing branches, resolving merge conflicts, understanding git history, or following team git conventions.
Git Workflows Guide
Expert guidance for Git version control workflows, branching strategies, and conflict resolution.
Core Principles
- Atomic commits - One logical change per commit
- Clear history - Meaningful commit messages that explain why
- Branch hygiene - Keep branches focused and short-lived
- Safe operations - Understand destructive commands before using
- Collaboration-friendly - Follow team conventions consistently
Detailed Reference Material
- [examples.md](examples.md) - Common workflows, including Feature Branch,
Trunk-Based, Conflict Resolution, and fixup/autosquash examples.
- [reference.md](reference.md) - Branch naming conventions, conflict strategies,
command reference tables, and fixup/autosquash strategy.
Quick Summary
Branch Naming
Use prefixes like feat/, fix/, docs/, refactor/ to categorize your branches.
Workflow Checklist
Before starting work:
- [ ] Pull latest from main
- [ ] Create appropriately named branch
- [ ] Understand the task scope
During work:
- [ ] Commit frequently with clear messages
- [ ] Keep changes focused on one concern
- [ ] Rebase on main periodically for long branches
Before PR:
- [ ] Rebase on latest main
- [ ] Squash fixup commits
- [ ] Run tests and linting
- [ ] Write clear PR description
Fixup + Autosquash
Use this when follow-up fixes belong to earlier commits and you want clean, atomic history:
git commit --fixup=<target-commit-hash>
GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash <oldest-target-hash>^
Then verify with:
git log --oneline -n 20
git status --shortUseful Git Commands
Inspection Commands
# View commit history
git log --oneline -20
git log --graph --all --oneline
# See what changed
git diff # Working vs staged
git diff --cached # Staged vs last commit
git diff main..feature # Between branches
# Find who changed what
git blame <file>
git log -p -- <file> # History of a file
Safety Guidelines
- Never force push to main/master
- Check if others are using the branch before force pushing
- Use
--force-with-leaseinstead of--forcewhen possible - Communicate with team first
See Also
- Commit messages: See [commit-messages](../commit-messages/) for
conventional commit format
- Code review: See [code-review](../code-review/) for PR review guidelines
Videos
Tutorials, guides, and showcases related to git-workflow. The player loads when you press play.
Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In