git
Skill2 starsChanged 21 days agoMITView on GitHub
Git expertise for everyday and advanced work: commits, branching, merging and rebasing, history/blame/bisect, remotes and forks, conflict resolution, undoing mistakes and recovering lost work, team workflows (GitHub Flow, Git Flow), stash, cherry-pick, hooks. Use when the user asks how to do something with git, is stuck in a git state, has a merge/rebase conflict, or wants to undo or recover changes.
57 other projects use a version of this.
Adopted by
Most recently taken up by
- bmcszk/agent-skillstheir own version, first seen Nov 8, 2026
- BridgLabs/opencodereviewtheir own version, first seen Nov 8, 2026
- Conceptual-Machines/magda-coretheir own version, first seen Nov 7, 2026
- tsukhani/jclawtheir own version, first seen Nov 5, 2026
- cekrauseee/harnesstheir own version, first seen Nov 1, 2026
- jmlrt/skillstheir own version, first seen Nov 1, 2026
Used with
Projects 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
MicrosoftSkilltypescript
TypeScript best practices for this monorepo. Use this skill when: (1) writing new TypeScript code, (2) reviewing TypeScript code, (3) working with API responses, fetch calls, or JSON parsing, (4) adding or modifying types and interfaces.
Also in 4 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 3 projects that use this
Microsoft AzureSkilltest
Also in 8 projects that use this
Other versions57 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 57
- 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★ 303same name
- Conceptual-Machines/magda-core★ 258same name
- typv/nest-turbo-starter★ 224same name
- BridgLabs/opencodereview★ 79same name
- matteing/opal★ 59same name
47 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.
In this repository39 other files it gives its agents.
- skills/react-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- check-seoSkill
- brainstormingSkill
- check-seoSkill
- code-reviewerSkill
- create-a-skillSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- advancedSkill
- basicsSkill
- branchingSkill
- conflictsSkill
- historySkill
- remoteSkill
- undoSkill
- workflowsSkill
- vercel-react-best-practicesSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- senior-backendSkill
- senior-frontendSkill
- senior-fullstackSkill
- senior-qaSkill
- skill-creatorSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- test-fullySkill
- using-git-worktreesSkill
- using-screenkitSkill
- vercel-composition-patternsSkill
- verification-before-completionSkill
- webapp-testingSkill
- web-crawlerSkill
- writing-plansSkill
- writing-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 16 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 51 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
10
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 17
Compatibility: All major Git hosting platforms (GitHub, GitLab, Bitbucket)
- Distinctive: line 22
Use skill paths to access specific functionality:
- Very specific: line 61
If you just use /git, Claude will analyze your request and automatically route to the appropriate sub-skill.
- Distinctive: line 144
Create and switch branches
- Distinctive: line 147
Delete local and remote branches
- Distinctive: line 156
Focus: Commit history and code archaeology
- Distinctive: line 172
Add and remove remotes
- Distinctive: line 231
Create and use Git hooks
- Distinctive: line 232
Use worktrees for parallel work
- Very specific: line 326
Start with /git/basics to learn fundamental concepts:
- Very specific: line 333
Use /git/branching for branch workflows:
- Very specific: line 340
Use /git/undo to fix problems:
- Very specific: line 347
Use /git/conflicts to resolve:
- Very specific: line 354
Use /git/workflows for patterns:
- Very specific: line 381
Use conventional commits: feat:, fix:, docs:, etc.
- Distinctive: line 394
Commit frequently with meaningful messages
- Distinctive: line 395
Use .gitignore to exclude generated files
- Distinctive: line 396
Never commit secrets or credentials
- Distinctive: line 397
Keep commits focused (one logical change per commit)
- Distinctive: line 400
Always review changes before pushing
- Distinctive: line 401
Use git fetch first to see what's new
- Distinctive: line 402
Avoid force push to shared branches
- Very specific: line 403
Use --force-with-lease if force push is necessary
- Distinctive: line 425
Use the appropriate sub-skill for your specific need
- Very specific: line 426
Check Git documentation with git help <command>
- Very specific: line 428
Use /git/troubleshooting patterns in relevant sub-skills
“Common” is measured: kept by at least 6 in 10 of the 51 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
Sub-skills are files in this skill's folder. The
/git/<name>paths below are routing labels, not commands: after choosing a sub-skill from the decision tree, read<name>/SKILL.mdnext to this file (e.g.basics/SKILL.md,conflicts/SKILL.md) and follow it.
Git Skill Suite
Purpose
Comprehensive Git expertise covering all workflows, from basic commits to advanced operations, conflict resolution, and team collaboration patterns.
Version
- Version: 1.0.0
- Last Updated: 2025-02-11
- Git Version: 2.30+
- Compatibility: All major Git hosting platforms (GitHub, GitLab, Bitbucket)
How to Use This Skill
Direct Sub-Skill Access
Use skill paths to access specific functionality:
/git/basics- Repository setup, commits, and fundamental workflows/git/branching- Branch management, merging, and rebasing/git/history- Commit history, diffs, and code archaeology/git/remote- Remote repository operations and syncing/git/conflicts- Merge and rebase conflict resolution/git/undo- Undo changes and recover lost work/git/workflows- Team workflows (GitHub Flow, Git Flow, etc.)/git/advanced- Stash, cherry-pick, hooks, and power features
Chat Command Examples
# Basic operations
/git/basics help me commit my changes with a good message
# Branching
/git/branching create feature branch and merge to main
# Conflict resolution
/git/conflicts resolve merge conflict in src/app.js
# History inspection
/git/history find when this bug was introduced
# Undo mistakes
/git/undo I accidentally committed to main, help me undo
# Remote operations
/git/remote sync my fork with upstream
# Team workflows
/git/workflows setup GitHub Flow for our team
# Advanced features
/git/advanced use stash to switch contexts quicklyAuto-Routing (Claude Decides)
If you just use /git, Claude will analyze your request and automatically route to the appropriate sub-skill.
Examples:
- "How do I commit my changes?" → routes to
/basics - "Create a new branch" → routes to
/branching - "I have a merge conflict" → routes to
/conflicts - "View commit history" → routes to
/history - "Undo last commit" → routes to
/undo - "Push to GitHub" → routes to
/remote - "What's GitHub Flow?" → routes to
/workflows - "Save work without committing" → routes to
/advanced
Decision Tree
User Request Analysis:
│
├─ Keywords: init, clone, commit, add, status, push, pull, .gitignore
│ → /basics
│
├─ Keywords: branch, checkout, merge, rebase, delete branch, switch
│ → /branching
│
├─ Keywords: log, diff, show, blame, bisect, history, who changed
│ → /history
│
├─ Keywords: remote, fetch, upstream, origin, fork, sync
│ → /remote
│
├─ Keywords: conflict, merge conflict, rebase conflict, <<<<<<, resolve
│ → /conflicts
│
├─ Keywords: undo, reset, revert, restore, reflog, recover, amend
│ → /undo
│
├─ Keywords: workflow, github flow, git flow, trunk-based, PR, pull request
│ → /workflows
│
└─ Keywords: stash, cherry-pick, hook, submodule, worktree, filter-branch
→ /advancedRequirements (Global)
<critical>
All sub-skills require:
- Git 2.30+ installed (`git --version`)
- Git configured with user.name and user.email
- Repository access (local or remote)
- For remote operations: SSH keys or HTTPS credentials configured
</critical>Quick Setup Verification
# Check Git version
git --version
# Check configuration
git config --list
# Verify you can authenticate
git ls-remote https://github.com/user/repoSub-Skills Overview
1. Basics
Focus: Repository fundamentals and daily workflows Common tasks:
- Initialize new repository
- Clone existing repository
- Stage and commit changes
- Push and pull from remote
- Create .gitignore files
- Configure Git settings
Key commands: init, clone, add, commit, push, pull, status
2. Branching
Focus: Branch management and integration Common tasks:
- Create and switch branches
- Merge branches (fast-forward and three-way)
- Rebase for linear history
- Delete local and remote branches
- Track remote branches
- Interactive rebase for cleanup
Key commands: branch, checkout, switch, merge, rebase
3. History
Focus: Commit history and code archaeology Common tasks:
- View commit history with filters
- Compare changes between commits
- Find who changed a line (blame)
- Binary search for bug introduction (bisect)
- Search commit messages
- Visualize branch history
Key commands: log, diff, show, blame, bisect
4. Remote
Focus: Remote repository operations Common tasks:
- Add and remove remotes
- Fetch vs pull (when to use each)
- Push with upstream tracking
- Manage multiple remotes (origin, upstream)
- Force push safely
- Sync fork with upstream
Key commands: remote, fetch, pull, push
5. Conflicts
Focus: Conflict resolution strategies Common tasks:
- Understand conflict markers
- Resolve merge conflicts
- Resolve rebase conflicts
- Use merge tools
- Accept theirs/ours strategy
- Prevent conflicts (pull before push)
Key commands: merge, rebase, mergetool, checkout --ours/--theirs
6. Undo
Focus: Reversing changes and recovery Common tasks:
- Undo staged changes
- Undo working directory changes
- Amend last commit
- Reset commits (soft, mixed, hard)
- Revert commits (safe for public history)
- Recover deleted commits with reflog
Key commands: restore, reset, revert, reflog, amend
7. Workflows
Focus: Team collaboration patterns Common tasks:
- GitHub Flow (feature branches + PRs)
- Git Flow (release branches)
- Trunk-Based Development
- Forking workflow (open source)
- Pull request best practices
- Code review workflows
Patterns: Feature branches, release management, hotfixes
8. Advanced
Focus: Power user features Common tasks:
- Stash uncommitted changes
- Cherry-pick specific commits
- Manage submodules
- Create and use Git hooks
- Use worktrees for parallel work
- Sparse checkout for large repos
Key commands: stash, cherry-pick, submodule, worktree, hook
Workflow Integration
For Team Development
# Step 1: Clone repository and setup
/git/basics clone team repository and configure settings
# Step 2: Create feature branch
/git/branching create feature branch from main
# Step 3: Make changes and commit
/git/basics commit changes with conventional commit message
# Step 4: Sync with remote
/git/remote pull latest changes from main
# Step 5: Resolve any conflicts
/git/conflicts resolve merge conflicts if any
# Step 6: Push feature branch
/git/remote push feature branch to origin
# Step 7: Review history before PR
/git/history review my commits before creating pull request
# Step 8: Follow team workflow
/git/workflows create pull request following GitHub FlowFor Solo Projects
# Initialize project
/git/basics setup new repository with .gitignore
# Regular workflow
/git/basics commit and push changes
# Undo mistakes
/git/undo fix commit message or undo changes
# Experiment safely
/git/branching create experimental branch
# Save work in progress
/git/advanced stash changes to switch contextFor Open Source Contribution
# Step 1: Fork and clone
/git/remote setup fork with upstream remote
# Step 2: Create feature branch
/git/branching create feature branch from upstream/main
# Step 3: Make changes
/git/basics commit changes following project guidelines
# Step 4: Sync with upstream
/git/remote sync fork with upstream
# Step 5: Clean up commits
/git/branching interactive rebase to squash commits
# Step 6: Submit PR
/git/workflows follow project contribution workflowQuick Reference
| Task | Sub-Skill | Command Example |
| First commit | basics | /git/basics initialize repository and make first commit |
| Create branch | branching | /git/branching create feature branch for login page |
| Merge conflict | conflicts | /git/conflicts resolve conflict in package.json |
| View history | history | /git/history show commits from last week |
| Undo commit | undo | /git/undo undo last commit but keep changes |
| Push to GitHub | remote | /git/remote push branch to GitHub |
| GitHub Flow | workflows | /git/workflows explain GitHub Flow process |
| Save WIP | advanced | /git/advanced stash changes and switch branch |
Common Scenarios
"I'm new to Git"
Start with /git/basics to learn fundamental concepts:
- What is a repository?
- How to make commits
- Basic workflow (add → commit → push)
- Setting up .gitignore
"I need to work on a feature"
Use /git/branching for branch workflows:
- Create feature branch
- Make commits on branch
- Merge back to main
- Delete feature branch
"I made a mistake"
Use /git/undo to fix problems:
- Uncommit changes
- Unstage files
- Discard local changes
- Recover deleted commits
"I have conflicts"
Use /git/conflicts to resolve:
- Understand conflict markers
- Choose correct version
- Test after resolution
- Complete merge/rebase
"We need a team workflow"
Use /git/workflows for patterns:
- Choose workflow (GitHub Flow, Git Flow, etc.)
- Set up branch protection
- Define PR process
- Establish code review standards
Installation
Copy this entire folder to your Claude skills directory:
# Option 1: User skills (recommended)
cp -r skills/git ~/.claude/skills/git
# Option 2: Windows PowerShell
Copy-Item -Recurse skills/git $env:USERPROFILE\.claude\skills\gitThen configure in your .claude file:
skills:
- ~/.claude/skills/gitBest Practices
Commit Messages
- Use conventional commits:
feat:,fix:,docs:, etc. - First line: brief summary (50 chars or less)
- Blank line, then detailed explanation if needed
- Reference issue numbers:
Fixes #123
Branch Naming
feature/description- New featuresfix/description- Bug fixeshotfix/description- Urgent production fixesdocs/description- Documentation changes
Git Hygiene
- Pull before push to avoid conflicts
- Commit frequently with meaningful messages
- Use .gitignore to exclude generated files
- Never commit secrets or credentials
- Keep commits focused (one logical change per commit)
Remote Operations
- Always review changes before pushing
- Use
git fetchfirst to see what's new - Avoid force push to shared branches
- Use
--force-with-leaseif force push is necessary
Related Documentation
- Official Git: https://git-scm.com/doc
- Pro Git Book: https://git-scm.com/book/en/v2
- GitHub Docs: https://docs.github.com
- GitLab Docs: https://docs.gitlab.com
- Atlassian Git Tutorials: https://www.atlassian.com/git/tutorials
Changelog
1.0.0 (2025-02-11)
- Initial Git skill suite release
- 8 sub-skills covering all major Git operations
- Support for GitHub Flow, Git Flow, and trunk-based development
- Comprehensive conflict resolution patterns
- Advanced features (stash, cherry-pick, hooks, worktrees)
Support
For Git issues or questions:
- Use the appropriate sub-skill for your specific need
- Check Git documentation with
git help <command> - Review error messages carefully - Git provides helpful hints
- Use
/git/troubleshootingpatterns in relevant sub-skills
License
Free to use and modify for personal/commercial projects.
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.

