Git
Git commits, branches, rebases, merges, conflict resolution, history recovery, team workflows, and the commands needed for safe day-to-day version control. U...
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 15 · 8k · 121 current installs · 123 all-time installs
byIván@ivangdavila
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description match the actual content: all files are Git guidance and require only the git binary. Nothing requested (env vars, credentials, config paths) is unrelated to version control.
Instruction Scope
SKILL.md and the supplemental files give concrete Git commands and workflows. They stay within Git operations (commits, rebases, merges, history recovery). The instructions mention destructive Git commands (reset --hard, force pushes) but only in the context of safety and recovery, which is appropriate for this skill's purpose.
Install Mechanism
No install spec and no code files — instruction-only. This minimizes risk because nothing is downloaded or written to disk by the skill itself.
Credentials
The skill requires no environment variables, credentials, or elevated config path access. That is proportionate for a Git guidance skill.
Persistence & Privilege
always is false and disable-model-invocation is false (normal). The skill does not request permanent system presence or modify other skills' configs.
Assessment
This skill is a documentation-style helper (no code) and appears to be what it claims. Before using it, be aware that following its recommended commands will cause your agent to run Git locally (which can modify or rewrite repository history). Make sure you: (1) have backups or can recover via reflog for important repos before performing destructive ops (reset --hard, rebase, force-push); (2) confirm the agent is operating in the intended repository/path; and (3) review any automated suggestions before applying them. Also note that the skill can be invoked autonomously by the agent (the platform default) — that is normal, but you should grant skills only to agents you trust to perform Git operations on your repositories.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.8
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
📚 Clawdis
OSLinux · macOS · Windows
Binsgit
SKILL.md
When to Use
Use when the task involves Git repositories, branches, commits, merges, rebases, pull requests, conflict resolution, history inspection, or recovery. This skill is stateless and should be applied by default whenever Git work is part of the job.
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 |
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
- git user.email wrong — Verify with
git config user.emailbefore important commits - Empty directories — Git doesn't track them, add
.gitkeep - Submodules — Always clone with
--recurse-submodules - Detached HEAD — Use
git switch -to return to previous branch - Push rejected — Usually needs
git pull --rebasefirst - stash pop on conflict — Stash disappears. Use
stash applyinstead - Large files — Use Git LFS for files >50MB, never commit secrets
- Case sensitivity — Mac/Windows ignore case, Linux doesn't — causes CI failures
Recovery Commands
- Undo last commit keeping changes:
git reset --soft HEAD~1 - Discard unstaged changes:
git restore filename - Find lost commits:
git reflog(keeps ~90 days of history) - Recover deleted branch:
git checkout -b branch-name <sha-from-reflog> - Use
git add -pfor partial staging when commit mixes multiple changes
Debugging with Bisect
Find the commit that introduced a bug:
git bisect start
git bisect bad # current commit is broken
git bisect good v1.0.0 # this version worked
# Git checks out middle commit, test it, then:
git bisect good # or git bisect bad
# Repeat until Git finds the culprit
git bisect reset # return to original branch
Quick Summary
git status -sb # short status with branch
git log --oneline -5 # last 5 commits
git shortlog -sn # contributors by commit count
git diff --stat HEAD~5 # changes summary last 5 commits
git branch -vv # branches with tracking info
git stash list # pending stashes
Related Skills
Install with clawhub install <slug> if user confirms:
gitlab— GitLab CI/CD and merge requestsdocker— Containerization workflowscode— Code quality and best practices
Feedback
- If useful:
clawhub star git - Stay updated:
clawhub sync
Files
7 totalSelect a file
Select a file to preview.
Comments
Loading comments…
