Git (Essentials + Workflows + Advanced)
Full version control coverage with essential commands, team workflows, branching strategies, and recovery techniques.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ivangdavila/gitSetup
On first use, read setup.md. Default: best practices mode (no config needed).
When to Use
User needs Git expertise — from basic operations to complex workflows. Agent handles branching, merging, rebasing, conflict resolution, and team collaboration patterns.
Architecture
Memory in ~/git/. See memory-template.md for structure.
~/git/
└── memory.md # User preferences (optional)
Quick Reference
| Topic | File |
|---|---|
| Essential commands | commands.md |
| Advanced operations | advanced.md |
| Branch strategies | branching.md |
| Conflict resolution | conflicts.md |
| History and recovery | history.md |
| Team workflows | collaboration.md |
| Setup | setup.md |
| Memory | memory-template.md |
Core Rules
- Never force push to shared branches — Use
--force-with-leaseon feature branches only - Commit early, commit often — Small commits are easier to review, revert, and bisect
- Write meaningful commit messages — First line under 72 chars, imperative mood
- Pull before push — Always
git pull --rebasebefore pushing to avoid merge commits - Clean up before merging — Use
git rebase -ito squash fixup commits
Team Workflows
Feature Branch Flow:
git checkout -b feature/namefrom main- Make commits, push regularly
- Open PR, get review
- Squash and merge to main
- Delete feature branch
Hotfix Flow:
git checkout -b hotfix/issuefrom main- Fix, test, commit
- Merge to main AND develop (if exists)
- Tag the release
Daily Sync:
git fetch --all --prune
git rebase origin/main # or merge if team prefers
Commit Messages
- Use conventional commit format:
type(scope): description - Keep first line under 72 characters
- Types:
feat,fix,docs,style,refactor,test,chore
Push Safety
- Use
git push --force-with-leaseinstead of--force— prevents overwriting others' work - If push rejected, run
git pull --rebasebefore retrying - Never force push to main/master branch
Conflict Resolution
- After editing conflicted files, verify no markers remain:
grep -r "<<<\|>>>\|===" . - Test that code builds before completing merge
- If merge becomes complex, abort with
git merge --abortand trygit rebaseinstead
Branch Hygiene
- Delete merged branches locally:
git branch -d branch-name - Clean remote tracking:
git fetch --prune - Before creating PR, rebase feature branch onto latest main
- Use
git rebase -ito squash messy commits before pushing
Safety Checklist
Before destructive operations (reset --hard, rebase, force push):
- Is this a shared branch? → Don't rewrite history
- Do I have uncommitted changes? → Stash or commit first
- Am I on the right branch? →
git branchto verify - Is remote up to date? →
git fetchfirst
Common Traps
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ivangdavila-git": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Animations
Create performant web animations with proper accessibility and timing.
Arduino
Develop Arduino projects avoiding common wiring, power, and code pitfalls.
Bulgarian
Write Bulgarian that sounds human. Not formal, not robotic, not AI-generated.
Arabic
Write Arabic that sounds human. Not formal, not robotic, not AI-generated.
Assistant
Manage tasks, communications, and scheduling with proactive and organized support.