# git_skill > Git 操作 Skill,提供常用的 Git 命令封装。 - Author: icetomoyo - Repository: icetomoyo/EvoSkill - Version: 20260207223822 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/icetomoyo/EvoSkill - Web: https://mule.run/skillshub/@@icetomoyo/EvoSkill~git_skill:20260207223822 --- # git Git 操作 Skill,提供常用的 Git 命令封装。 ## 描述 简化 Git 操作,支持状态查看、差异比较、提交代码、查看历史等功能。 ## 版本 0.1.0 ## 工具 ### git_status 查看工作区的 Git 状态。 **参数**: - `path` (string, optional): 要查看的路径,默认为当前目录 - `short` (bool, optional): 是否使用简洁格式,默认为 True **返回值**: Git 状态信息 **错误处理**: - 路径不存在 - 不是 Git 仓库 ### git_diff 查看文件的修改差异。 **参数**: - `path` (string, optional): 要比较的文件路径,默认为所有文件 - `cached` (bool, optional): 是否查看已暂存的更改,默认为 False **返回值**: 差异内容 **错误处理**: - 路径不存在 - 不是 Git 仓库 ### git_commit 提交暂存的更改。 **参数**: - `message` (string, required): 提交信息 - `add_all` (bool, optional): 是否自动暂存所有更改,默认为 False **返回值**: 提交结果 **错误处理**: - 没有要提交的更改 - 提交信息为空 ### git_log 查看提交历史。 **参数**: - `limit` (int, optional): 显示的提交数量,默认为 10 - `oneline` (bool, optional): 是否使用单行格式,默认为 True **返回值**: 提交历史列表 **错误处理**: - 不是 Git 仓库 ### git_branch 查看和管理分支。 **参数**: - `list_branches` (bool, optional): 是否列出所有分支,默认为 True **返回值**: 分支列表 **错误处理**: - 不是 Git 仓库 ## 依赖 - Git 命令行工具已安装 --- Generated by EvoSkill