agentleFS
shreyam1008shreyam1008/shre-skills/skills/git/SKILL.md

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
  1. Very specific:

    Write good messages — Conventional Commits: type(scope): summary (feat, fix, docs, refactor, test, chore, perf).

    line 15
  2. Very specific:

    Never commit secrets, large binaries, build artifacts, or node_modules — that's what .gitignore is for.

    line 17
  3. Distinctive:

    Keep main releasable. Integrate often to avoid drift and giant merges.

    line 29
  4. Distinctive:

    If you must overwrite a pushed *personal* branch, use git push --force-with-lease (refuses if someone else pushed).

    line 37
  5. Distinctive:

    Keep PRs small and focused.

    line 62
  6. Distinctive:

    Use signed commits/tags where required.

    line 64

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 -p to 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 .gitignore is 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 like feat/login, fix/cors-headers.
  • Keep main releasable. Integrate often to avoid drift and giant merges.
  • Pull with --ff-only or 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> and git log -p <file> to trace why a line exists.
  • git bisect to 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 reflog shows where HEAD has been; git checkout/reset to 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 rerere can 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.

Download now (ZIP)

  • Other versions53 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 53

    1. macro-inc/macro★ 6ksame name
    2. epicenter-md/epicenter★ 4.8ksame name
    3. EpicenterHQ/epicenter★ 4.8ksame name
    4. carapace-sh/carapace-bin★ 2ksame name
    5. LuisaGroup/LuisaCompute★ 1.1ksame name
    6. kagenti/kagenti★ 300same name
    7. Conceptual-Machines/magda-core★ 253same name
    8. typv/nest-turbo-starter★ 224same name
    9. matteing/opal★ 59same name
    10. 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.
    • thechandanbhagatSkill

      sql

      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

    • mrgoonieSkill

      databases

      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

    • mrgoonieSkill

      devops

      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 AzureSkill

      test

      Also in 7 projects that use this

    • AnthropicSkill

      debug

      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 AzureSkill

      design

      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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.