docs: 重构命令和技能文档体系,规范化文档格式和内容组织
This commit is contained in:
@@ -2,53 +2,28 @@
|
||||
description: Check git working directory status and file changes
|
||||
---
|
||||
|
||||
# git-status
|
||||
Check the current git repository status and display file changes in a clear, organized format.
|
||||
|
||||
Check current git repository status and display file changes in a clear format.
|
||||
Please perform the following tasks:
|
||||
|
||||
## What It Does
|
||||
1. **Run `git status`** to show the current state of the working tree
|
||||
2. **Display current branch** using `git branch --show-current`
|
||||
3. **List unstaged changes** with `git diff --name-only`
|
||||
4. **List staged changes** with `git diff --cached --name-only`
|
||||
|
||||
- Shows current branch
|
||||
- Lists changed files (unstaged and staged)
|
||||
|
||||
## Steps
|
||||
|
||||
Execute the following commands in parallel:
|
||||
|
||||
```bash
|
||||
# Current branch
|
||||
git branch --show-current
|
||||
|
||||
# Repository status
|
||||
git status
|
||||
|
||||
# List changed files only
|
||||
echo "=== Unstaged Changes ==="
|
||||
git diff --name-only
|
||||
|
||||
echo "=== Staged Changes ==="
|
||||
git diff --cached --name-only
|
||||
```
|
||||
|
||||
## Output Format
|
||||
|
||||
Present the information in Chinese with clear sections:
|
||||
Present the information in Chinese with the following structure:
|
||||
|
||||
```
|
||||
当前分支:main
|
||||
当前分支: [branch_name]
|
||||
|
||||
未暂存的文件 (3):
|
||||
- src/index.js
|
||||
- src/utils.js
|
||||
- README.md
|
||||
暂存区文件 ([count]):
|
||||
[列出已暂存的文件]
|
||||
|
||||
已暂存的文件 (2):
|
||||
- package.json
|
||||
- src/config.js
|
||||
未暂存的修改 ([count]):
|
||||
[列出未暂存的修改文件]
|
||||
|
||||
未跟踪的文件 ([count]):
|
||||
[列出未跟踪的文件]
|
||||
```
|
||||
|
||||
## Use Cases
|
||||
|
||||
- Quick status check before committing
|
||||
- Review what files have changed
|
||||
- Check if you're on the correct branch
|
||||
Use clear formatting and emoji indicators (✓, ⚠️, etc.) to make the output easy to read.
|
||||
|
||||
Reference in New Issue
Block a user