Git (Essentials + Workflows + Advanced)
Full version control coverage with essential commands, team workflows, branching strategies, and recovery techniques.
Best use case
Git (Essentials + Workflows + Advanced) is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Full version control coverage with essential commands, team workflows, branching strategies, and recovery techniques.
Teams using Git (Essentials + Workflows + Advanced) should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/git/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Git (Essentials + Workflows + Advanced) Compares
| Feature / Agent | Git (Essentials + Workflows + Advanced) | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Full version control coverage with essential commands, team workflows, branching strategies, and recovery techniques.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
## Setup On first use, read `setup.md`. Default: best practices mode (no config needed). ## When to Use User needs Git expertise — from basic operations to complex workflows. Agent handles branching, merging, rebasing, conflict resolution, and team collaboration patterns. ## Architecture Memory in `~/git/`. See `memory-template.md` for structure. ``` ~/git/ └── memory.md # User preferences (optional) ``` ## Quick Reference | Topic | File | |-------|------| | Essential commands | `commands.md` | | Advanced operations | `advanced.md` | | Branch strategies | `branching.md` | | Conflict resolution | `conflicts.md` | | History and recovery | `history.md` | | Team workflows | `collaboration.md` | | Setup | `setup.md` | | Memory | `memory-template.md` | ## Core Rules 1. **Never force push to shared branches** — Use `--force-with-lease` on feature branches only 2. **Commit early, commit often** — Small commits are easier to review, revert, and bisect 3. **Write meaningful commit messages** — First line under 72 chars, imperative mood 4. **Pull before push** — Always `git pull --rebase` before pushing to avoid merge commits 5. **Clean up before merging** — Use `git rebase -i` to squash fixup commits ## Team Workflows **Feature Branch Flow:** 1. `git checkout -b feature/name` from main 2. Make commits, push regularly 3. Open PR, get review 4. Squash and merge to main 5. Delete feature branch **Hotfix Flow:** 1. `git checkout -b hotfix/issue` from main 2. Fix, test, commit 3. Merge to main AND develop (if exists) 4. Tag the release **Daily Sync:** ```bash git fetch --all --prune git rebase origin/main # or merge if team prefers ``` ## Commit Messages - Use conventional commit format: `type(scope): description` - Keep first line under 72 characters - Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore` ## Push Safety - Use `git push --force-with-lease` instead of `--force` — prevents overwriting others' work - If push rejected, run `git pull --rebase` before retrying - Never force push to main/master branch ## Conflict Resolution - After editing conflicted files, verify no markers remain: `grep -r "<<<\|>>>\|===" .` - Test that code builds before completing merge - If merge becomes complex, abort with `git merge --abort` and try `git rebase` instead ## Branch Hygiene - Delete merged branches locally: `git branch -d branch-name` - Clean remote tracking: `git fetch --prune` - Before creating PR, rebase feature branch onto latest main - Use `git rebase -i` to squash messy commits before pushing ## Safety Checklist Before destructive operations (`reset --hard`, `rebase`, `force push`): - [ ] Is this a shared branch? → Don't rewrite history - [ ] Do I have uncommitted changes? → Stash or commit first - [ ] Am I on the right branch? → `git branch` to verify - [ ] Is remote up to date? → `git fetch` first ## Common Traps - **git user.email wrong** — Verify with `git config user.email` before important commits - **Empty directories** — Git doesn't track them, add `.gitkeep` - **Submodules** — Always clone with `--recurse-submodules` - **Detached HEAD** — Use `git switch -` to return to previous branch - **Push rejected** — Usually needs `git pull --rebase` first - **stash pop on conflict** — Stash disappears. Use `stash apply` instead - **Large files** — Use Git LFS for files >50MB, never commit secrets - **Case sensitivity** — Mac/Windows ignore case, Linux doesn't — causes CI failures ## Recovery Commands - Undo last commit keeping changes: `git reset --soft HEAD~1` - Discard unstaged changes: `git restore filename` - Find lost commits: `git reflog` (keeps ~90 days of history) - Recover deleted branch: `git checkout -b branch-name <sha-from-reflog>` - Use `git add -p` for partial staging when commit mixes multiple changes ## Debugging with Bisect Find the commit that introduced a bug: ```bash git bisect start git bisect bad # current commit is broken git bisect good v1.0.0 # this version worked # Git checks out middle commit, test it, then: git bisect good # or git bisect bad # Repeat until Git finds the culprit git bisect reset # return to original branch ``` ## Quick Summary ```bash git status -sb # short status with branch git log --oneline -5 # last 5 commits git shortlog -sn # contributors by commit count git diff --stat HEAD~5 # changes summary last 5 commits git branch -vv # branches with tracking info git stash list # pending stashes ``` ## Related Skills Install with `clawhub install <slug>` if user confirms: - `gitlab` — GitLab CI/CD and merge requests - `docker` — Containerization workflows - `code` — Code quality and best practices ## Feedback - If useful: `clawhub star git` - Stay updated: `clawhub sync`
Related Skills
typescript-advanced-types
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.
ths-advanced-analysis
基于 thsdk 进行高级股票分析:分钟K线(1m/5m/15m/30m/60m/120m)、板块/指数行情(主要指数/申万行业/概念板块成分股)、多股票批量对比(表格+归一化走势图+相关性热力图)、盘口深度、大单流向、集合竞价异动、日内分时、历史分时。当用户提到"分钟K线"、"日内走势"、"盘口"、"大单"、"竞价异动"、"板块行情"、"行业排名"、"概念板块"、"成分股"、"对比多只股票"、"批量分析"、"涨幅对比"、"相关性",或者需要同时查看2只以上股票、关注短线交易、量化研究时,必须使用此skill。
git-essentials
Essential Git commands and workflows for version control, branching, and collaboration.
expo-cicd-workflows
Helps understand and write EAS workflow YAML files for Expo projects. Use this skill when the user asks about CI/CD or workflows in an Expo or EAS context, mentions .eas/workflows/, or wants help with EAS build pipelines or deployment automation.
docker-essentials
Essential Docker commands and workflows for container management, image operations, and debugging.
automation-workflows
Design and implement automation workflows to save time and scale operations as a solopreneur. Use when identifying repetitive tasks to automate, building workflows across tools, setting up triggers and actions, or optimizing existing automations. Covers automation opportunity identification, workflow design, tool selection (Zapier, Make, n8n), testing, and maintenance. Trigger on "automate", "automation", "workflow automation", "save time", "reduce manual work", "automate my business", "no-code automation".
youtube-watcher
Fetch and read transcripts from YouTube videos. Use when you need to summarize a video, answer questions about its content, or extract information from it.
youtube-transcript
Fetch and summarize YouTube video transcripts. Use when asked to summarize, transcribe, or extract content from YouTube videos. Handles transcript fetching via residential IP proxy to bypass YouTube's cloud IP blocks.
youtube-auto-captions - YouTube 自动字幕
## 描述
youtube
YouTube Data API integration with managed OAuth. Search videos, manage playlists, access channel data, and interact with comments. Use this skill when users want to interact with YouTube. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
yahoo-finance
Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance. Uses yfinance library - no API key required.
xurl
A Twitter research and content intelligence skill focused on attracting WordPress and Shopify clients. Use to analyze Twitter profiles, threads, and conversations for: (1) Identifying what small agency founders and eCommerce brands are discussing; (2) Understanding pain points around WordPress performance, Shopify CRO, and development bottlenecks; (3) Extracting high-performing content angles; (4) Turning insights into authority-building posts; (5) Converting Twitter intelligence into business leverage for clear content angles, strong positioning, and qualified inbound leads.