senior-git-workflow
Skill2 starsChanged 5 days agoMITView on GitHub
Use when planning or performing Git work such as branching strategy, commits and messages, rebasing or merging, resolving conflicts, cherry-picking, bisecting, recovering lost work, rewriting history, tagging and releases, monorepo or submodule issues, or repository hygiene (.gitignore, large files, leaked secrets).
- Deletes or force-pushes
- Commits and pushes
In this repository50 other files it gives its agents.
- angular-standardSkill
- business-analyst-standardSkill
- execute-browser-verifySkill
- execute-build-testSkill
- execute-debug-evidenceSkill
- execute-implementationSkill
- jira-ba-dev-test-flowSkill
- nestjs-standardSkill
- professional-slidesSkill
- python-standardSkill
- senior-angularSkill
- senior-api-designSkill
- senior-backend-engineerSkill
- senior-business-analystSkill
- senior-cicdSkill
- senior-cloud-serverSkill
- senior-code-reviewSkill
- senior-delivery-orchestratorSkill
- senior-designSkill
- senior-dockerSkill
- senior-dotnetSkill
- senior-flutterSkill
- senior-frontend-engineerSkill
- senior-goSkill
- senior-java-springSkill
- senior-kubernetesSkill
- senior-manual-testingSkill
- senior-mongodbSkill
- senior-mysqlSkill
- senior-nestjsSkill
- senior-nextjsSkill
- senior-nodejsSkill
- senior-observabilitySkill
- senior-performanceSkill
- senior-postgresqlSkill
- senior-python-backendSkill
- senior-react-nativeSkill
- senior-reactSkill
- senior-redisSkill
- senior-refactoringSkill
- senior-securitySkill
- senior-sql-serverSkill
- senior-tech-leadSkill
- senior-technical-writingSkill
- senior-terraformSkill
- senior-test-automationSkill
- senior-test-engineerSkill
- senior-vueSkill
- solution-architect-standardSkill
- tester-standardSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
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 10
Keep history clear and recoverable, resolve conflicts without losing work, and never surprise collaborators with destructive changes.
- Distinctive: line 14
Check the state: git status, current branch, upstream tracking, unpushed commits, stashes, and whether the branch is shared or protected.
- Distinctive: line 15
Read the repository's branching, commit message, and release conventions (contributing guide, PR templates, tag format).
- Very specific: line 16
Before any destructive operation (force push, history rewrite, reset --hard, branch or tag deletion), create a backup ref and get explicit …
- Very specific: line 21
Prefer git push --force-with-lease over --force, and never force-push shared or protected branches without agreement.
- Distinctive: line 23
Use git bisect with a test command to find regressions.
- Very specific: line 26
Keep build output, dependencies, and local config out of the repository with .gitignore.
- Distinctive: line 30
After the operation, confirm with git log --oneline --graph, git status, and a diff against the expected tree, and run tests after merges, …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Senior Git Workflow
Role
Keep history clear and recoverable, resolve conflicts without losing work, and never surprise collaborators with destructive changes.
Before Acting
- Check the state:
git status, current branch, upstream tracking, unpushed commits, stashes, and whether the branch is shared or protected. - Read the repository's branching, commit message, and release conventions (contributing guide, PR templates, tag format).
- Before any destructive operation (force push, history rewrite,
reset --hard, branch or tag deletion), create a backup ref and get explicit authorization.
Workflow Rules
- Make focused commits with messages that state what and why, following the project's convention (for example Conventional Commits).
- Prefer
git push --force-with-leaseover--force, and never force-push shared or protected branches without agreement. - Resolve conflicts by understanding both sides: read each change's intent, keep both behaviors where required, then run tests. Never resolve by blindly choosing ours or theirs for whole files.
- Use
git bisectwith a test command to find regressions; usegit reflogto recover lost commits before assuming work is gone. - Rewriting published history changes every downstream hash and tag: update tags and releases and tell collaborators to re-clone or reset.
- Leaked secrets: rotate the secret first, then remove it from history (git filter-repo or BFG) and force-push with coordination; history rewriting alone is not enough.
- Keep build output, dependencies, and local config out of the repository with
.gitignore; use Git LFS for large binaries if the project allows it.
Verification
After the operation, confirm with git log --oneline --graph, git status, and a diff against the expected tree, and run tests after merges, rebases, or conflict resolutions.
Review Checklist
- Was a backup ref created before any destructive step?
- Is the resulting history and tree exactly what was intended?
- Were collaborators, tags, and releases accounted for after rewrites?
- Are secrets rotated, not just removed from history?
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.

