用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/williballenthin/aiwilli --skill working-with-git命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | working-with-git |
| description | Git version control cheatsheet - viewing history, making commits, diffs, and descriptions |
Quick reference for common Git operations used in development workflows.
Check if the project uses Git:
test -d .git && echo "git" || echo "not git"
Show recent commits:
git log --oneline -10
Show log with graph:
git log --oneline --graph --all -10
Show specific commit:
git log -1 <commit-sha>
Find commits by message:
git log --oneline --grep="keyword"
See uncommitted changes:
git diff
See staged changes:
git diff --cached
Diff between commits:
git diff <base-sha>..<head-sha>
Diff stats:
git diff --stat <base-sha>..<head-sha>
Show what changed in a commit:
git show <commit-sha>
Current commit SHA:
git rev-parse HEAD
Parent commit SHA:
git rev-parse HEAD~1
Branch's remote tracking commit:
git rev-parse origin/main
Relative references:
HEAD - current commitHEAD~1 or HEAD^ - parent commitHEAD~2 - grandparent commitorigin/main - remote branch tipStage and commit:
git add <files>
git commit -m "commit message"
Commit all tracked changes:
git commit -am "commit message"
Stage specific hunks interactively:
git add -p
Amend last commit message:
git commit --amend -m "new message"
Amend last commit (open editor):
git commit --amend
Change older commit messages (interactive rebase):
git rebase -i HEAD~3
(Then mark commits with reword in the editor)
Current branch:
git branch --show-current
Check if branch tracks remote:
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
See working tree status:
git status
Short status:
git status -s
Get range for code review:
BASE_SHA=$(git rev-parse HEAD~1)
HEAD_SHA=$(git rev-parse HEAD)
echo "Reviewing: $BASE_SHA..$HEAD_SHA"
Compare against main:
git diff origin/main..HEAD
See files changed:
git diff --name-only <base>..<head>