git
Skill0 starsChanged 48 days agoMITView on GitHub
Manages Git commits, branches, conflict resolution, and recovery. Use when the task requires Git operations or history analysis; follow the repository workflow.
- Deletes or force-pushes
- Commits and pushes
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 47 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 15
Write good messages — Conventional Commits: type(scope): summary (feat, fix, docs, refactor, test, chore, perf).
- Very specific: line 17
Never commit secrets, large binaries, build artifacts, or node_modules — that's what .gitignore is for.
- Distinctive: line 29
Keep main releasable. Integrate often to avoid drift and giant merges.
- Distinctive: line 37
If you must overwrite a pushed *personal* branch, use git push --force-with-lease (refuses if someone else pushed).
- Distinctive: line 62
Keep PRs small and focused.
- Distinctive: line 64
Use signed commits/tags where required.
“Common” is measured: kept by at least 6 in 10 of the 47 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git
Git is a content-addressed history of snapshots. Most "scary" situations are recoverable because commits aren't deleted immediately — git reflog is your safety net. Optimize for a history that's easy to read and bisect.
Commit hygiene
- One logical change per commit; keep them small and self-contained (each should build/pass tests).
- Stage intentionally:
git add -pto split unrelated changes. - Write good messages — Conventional Commits:
type(scope): summary(feat,fix,docs,refactor,test,chore,perf).- Imperative mood, ≤ ~50-char subject, blank line, then why in the body (not just what).
- Never commit secrets, large binaries, build artifacts, or
node_modules— that's what.gitignoreis for.
feat(auth): add refresh-token rotation
Access tokens now expire in 15m and rotate on refresh to limit
replay if one leaks. Closes #142.Branching
- Short-lived feature branches off
main; branch names likefeat/login,fix/cors-headers. - Keep
mainreleasable. Integrate often to avoid drift and giant merges. - Pull with
--ff-onlyor rebase to avoid noise:git pull --rebase.
Merge vs rebase
- Rebase local, unpushed work to keep history linear:
git rebase main(replays your commits on top). - Merge to integrate shared branches and preserve context (often a PR squash-merge).
- Golden rule: never rebase/force-push history others have based work on (shared
main/release branches). Rebase only your own private branches. - If you must overwrite a pushed personal branch, use
git push --force-with-lease(refuses if someone else pushed).
Inspect history
git status,git log --oneline --graph --decorate,git diff/--staged.git blame <file>andgit log -p <file>to trace why a line exists.git bisectto binary-search the commit that introduced a bug.
Undo / recover (most are safe)
- Unstage:
git restore --staged <file>. Discard working changes:git restore <file>(destructive — be sure). - Amend last commit (message or forgotten file):
git commit --amend(only if not yet shared). - Undo a public commit safely:
git revert <sha>(new inverse commit — never rewrites shared history). - Move branch pointer:
git reset --soft(keep changes staged) /--mixed(keep unstaged) /--hard(discard — careful). - Stash WIP:
git stash push -m "msg"/git stash pop. - Lost a commit?
git reflogshows where HEAD has been;git checkout/resetto that SHA to recover.
Conflicts
- Resolve hunk by hunk; keep the intended behavior, not just "accept theirs/mine".
- Build + test after resolving, before continuing the merge/rebase.
git rererecan auto-reuse recorded resolutions for repeated conflicts.
Collaboration & safety
- Keep PRs small and focused; describe why and how to verify.
- Protect
main(require review/CI; block force-push). Don't push directly to a CI/CD-connected branch unless that's the agreed flow. - Use signed commits/tags where required; tag releases with annotated tags (
git tag -a v1.2.0 -m). .gitignore+ (optionally) a secret-scanning pre-commit hook to stop leaks early.
Reference
- Pro Git book (git-scm.com/book);
git help <command>. - Conventional Commits spec (conventionalcommits.org); Atlassian Git tutorials.
Other versions53 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 53
- macro-inc/macro★ 6ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- carapace-sh/carapace-bin★ 2ksame name
- LuisaGroup/LuisaCompute★ 1.1ksame name
- kagenti/kagenti★ 300same name
- Conceptual-Machines/magda-core★ 253same name
- typv/nest-turbo-starter★ 224same name
- matteing/opal★ 59same name
- maragudk/skills★ 49same name
43 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use sql, databases and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
thechandanbhagatSkillsql
Write SQL queries, optimize database performance, design schemas, and debug SQL issues. Use for database operations, query optimization, and schema design.
Also in 4 projects that use this
mrgoonieSkilldatabases
Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin). Use when designing database schemas, writing queries and aggregations, optimizing indexes for performance, performing database migrations, configuring replication and sharding, implementing backup and restore strategies, managing database users and permissions, analyzing query performance, or administering production databases.
Also in 3 projects that use this
mrgoonieSkilldevops
Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.
Also in 4 projects that use this
Microsoft AzureSkilltest
Also in 7 projects that use this
AnthropicSkilldebug
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
Also in 8 projects that use this
Microsoft AzureSkilldesign
Design rules and conventions for the API Center Portal. Use when editing detail pages, card components, badges, layout, navigation, sidebars, or headers. Covers badge styling, metadata placement, page navigation patterns, and layout alignment.
Also in 7 projects that use this
- +1 more from Azure
In this repository21 other files it gives its agents.
- ask-dont-assumeSkill
- browser-devtoolsSkill
- cachingSkill
- code-qualitySkill
- cssSkill
- database-guardrailsSkill
- htmlSkill
- javascriptSkill
- low-level-web-renderingSkill
- react-best-practicesSkill
- react-three-fiberSkill
- securitySkill
- service-workerSkill
- tanstackSkill
- vgpuSkill
- wasm-rustSkill
- web-design-guidelinesSkill
- webglSkill
- webgpuSkill
- web-performanceSkill
- webview2-winuiSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

