git
Basic git operations for repository inspection. Use for git diff, git log, git status, git remote, and other read-only git commands.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Git CLI
Purpose
This skill provides access to basic git commands for inspecting repository state. Use this for read-only operations like viewing diffs, logs, and status.
Command Reference
Repository State
| Action | Command |
|---|---|
| Status | git status |
| Remote URLs | git remote -v |
| Current branch | git branch --show-current |
| All branches | git branch -a |
Viewing Changes
| Action | Command |
|---|---|
| Unstaged changes | git diff |
| Staged changes | git diff --cached |
| All changes | git diff HEAD |
| Changes vs branch | git diff <branch>...HEAD |
| Changed files only | git diff --name-only |
| Stat summary | git diff --stat |
History
| Action | Command |
|---|---|
| Recent commits | git log --oneline -n 10 |
| Branch commits | git log main..HEAD --oneline |
| Commit details | git log -1 --format=full |
| File history | git log --oneline -- <file> |
| Blame | git blame <file> |
Inspection
| Action | Command |
|---|---|
| Show commit | git show <commit> |
| Show file at commit | git show <commit>:<file> |
| List tracked files | git ls-files |
Behavioral Guidelines
- Read-only: This skill is for inspection only, not for making changes
-
Prefer short output: Use
--oneline,--stat, or-nflags to limit output -
Branch detection: Use
git branch --show-currentto identify the current branch -
Platform detection: Use
git remote -vto determine if GitHub or GitLab, then use the appropriate skill
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-28
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!