git-ops
Skill1 starsChanged 4 months agoMITView on GitHub
Git workflow mechanics — clean commits, branching, rebasing, resolving conflicts, and authoring good pull requests. Use when committing, branching, rebasing, squashing, resolving merge conflicts, cleaning up history, or opening/updating a PR. For reviewing someone else's PR use `/review`; for reviewing your own diff use `/code-review`.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- Crawford-Young/claude-configtheir own version, first seen Oct 25, 2026
- rohinipachanta/claude-code-quickstarttheir own version, first seen Oct 13, 2026
- JakkuSakura/skillstheir own version, first seen Oct 11, 2026
- evyatarv/claude-skillstheir own version, first seen May 28, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- evyatarv/claude-skills★ 1same name
- JakkuSakura/skills★ 1same name
- rohinipachanta/claude-code-quickstart★ 1same name
- Crawford-Young/claude-config★ 0same name
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.
In this repository10 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- agent-llmSkill
- dataSkill
- debugSkill
- doc-coauthoringSkill
- frontend-designSkill
- loop-verifySkill
- refactorSkill
- securitySkill
- testingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 5 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
8
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
- Distinctive: line 15
Commit in logical units: one concern per commit, each one leaving the tree in a working state.
- Very specific: line 17
Never commit secrets, .env, build output, or debug logging.
- Very specific: line 21
Prefer rebasing your feature branch onto the latest base for a linear, readable history: git fetch origin && git rebase origin/main.
- Very specific: line 23
After a rebase you must force-push with lease: git push --force-with-lease (never bare --force — lease refuses if someone else pushed, …
- Very specific: line 32
Autosquash fixups: commit with --fixup=<sha>, then git rebase --autosquash origin/main (non-interactive with GIT_SEQUENCE_EDITOR=true).
- Very specific: line 37
Read both sides before editing.
- Very specific: line 39
After resolving: git add the files, run the tests/typecheck (pnpm test), then git rebase --continue.
- Distinctive: line 45
Keep PRs small and single-purpose — a 200-line focused PR gets a real review.
- Distinctive: line 47
Call out risk explicitly: migrations, config/env changes, anything not covered by tests, and the rollback plan.
- Distinctive: line 53
Don't rewrite history that's already merged or that others have pulled.
- Very specific: line 54
Don't force-push shared branches.
- Very specific: line 55
Treat db/migrations/* as append-only after merge — new migration, never edit the old one (project rule + harness guard).
- Distinctive: line 56
Don't push unless asked. Confirm the target branch and remote before any push.
“Common” is measured: kept by at least 6 in 10 of the 3 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-Ops: PRs + Rebases
History is a story other people read. Each commit should be a coherent, revertible step; each PR a reviewable unit. Optimize for the reviewer and for the person who runs git blame in a year.
Note: this environment does not support interactive git (
git rebase -i,git add -i). Use the non-interactive techniques below. Useghfor GitHub operations. Only commit/push when asked; if you're on the default branch, branch first.
Branching & commits
- Branch off an up-to-date base:
git fetch && git switch -c feat/short-topic origin/main. Name by intent (fix/…,feat/…,chore/…). - Commit in logical units: one concern per commit, each one leaving the tree in a working state. Stage selectively (
git add -pwhere supported, or by path) — don'tgit add -Aa mixed bag. - Commit messages: imperative subject ≤ ~50 chars ("Add rate limit to login"), blank line, then why in the body — the diff already shows what. Reference the issue/ticket.
- Never commit secrets,
.env, build output, or debug logging. Checkgit diff --stagedbefore every commit.
Keeping a branch current (rebase over merge)
- Prefer rebasing your feature branch onto the latest base for a linear, readable history:
git fetch origin && git rebase origin/main. - Reserve
mergefor integrating finished branches into the base (or when the branch is shared and others have based work on it — don't rebase shared history out from under people). - After a rebase you must force-push with lease:
git push --force-with-lease(never bare--force— lease refuses if someone else pushed, preventing clobbering their work). The harness denies bare--force; use the lease form.
Non-interactive rebase recipes
Since -i isn't available here:
- Squash a whole branch into one commit:
git reset --soft $(git merge-base HEAD origin/main) && git commit -m "…"— moves the branch pointer back but keeps all changes staged, then one clean commit. - Amend the latest commit:
git commit --amend(message) orgit add <files> && git commit --amend --no-edit(content). - Undo the last commit, keep changes:
git reset --soft HEAD~1. - Autosquash fixups: commit with
--fixup=<sha>, thengit rebase --autosquash origin/main(non-interactive withGIT_SEQUENCE_EDITOR=true). - Drop/reorder specific commits: cherry-pick the ones you want onto a fresh branch from base, in the order you want.
Resolving conflicts
- Read both sides before editing; understand why each change exists rather than blindly picking one.
git log --merge -p <file>shows the conflicting commits. - Resolve to what's correct, which may be neither side verbatim. Remove every conflict marker (
grep -rn '^<<<<<<<\|^>>>>>>>\|^======='to be sure none survive). - After resolving:
git addthe files, run the tests/typecheck (pnpm test), thengit rebase --continue. A build-broken "resolved" conflict is not resolved. git rebase --abortis always a safe escape hatch if it gets messy — back out and retry deliberately.
Authoring the pull request
- Title: what changes, imperatively. Body: the problem, the approach, and how you verified it (tests run, manual check). Link the issue.
- Keep PRs small and single-purpose — a 200-line focused PR gets a real review; a 2,000-line grab-bag gets a rubber stamp.
- Justify any new dependency in the PR body (project rule) — what it's for and why an existing tool won't do.
- Call out risk explicitly: migrations, config/env changes, anything not covered by tests, and the rollback plan.
- Self-review the diff first (
/code-reviewon your working tree) and make sure CI is green before requesting review. Open withgh pr create. - Respond to every review comment (change or explain); push follow-up commits during review, and squash to a clean history before merge if the team squashes.
Guardrails
- Don't rewrite history that's already merged or that others have pulled.
- Don't force-push shared branches;
--force-with-leaseonly, on your own branch. - Treat
db/migrations/*as append-only after merge — new migration, never edit the old one (project rule + harness guard). - Don't push unless asked. Confirm the target branch and remote before any push.
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.

