Files
opencode/command/git-push.md
voson 43e138b19e feat: 新增对话总结命令与浏览器自动化技能
- 本地化命令描述(英文→中文)

- 删除未使用命令文件

- 新增 summarize-conversation 命令

- 更新 AI 模型配置为 DeepSeek

- 新增 agent-browser 技能

- 重构技能目录结构(重命名)
2026-01-15 17:30:39 +08:00

56 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: 提交暂存文件,创建版本标签并推送到远程仓库
---
Complete workflow: auto-generate commit message, create version tag, commit, and push everything to remote repository.
This is the **all-in-one command** that combines `/git-commit` + push operations.
Please perform the following:
1-7. **Follow the same steps as `/git-commit`:**
- Check staging area (must not be empty)
- Analyze changes and repository type
- Detect project type and version
- Generate commit message (Conventional Commits, Chinese)
- Update version number if needed
- Commit changes
- Create version tag
Refer to `/git-commit` for detailed steps or `@skill/git/SKILL.md` for complete workflow.
8. **Push commit to remote:**
```bash
git push origin $(git branch --show-current)
```
9. **Push tag to remote** (only if tag was created):
- Polyrepo: `git push origin <version>`
- Monorepo: `git push origin <subproject>-<version>`
10. **Display result in Chinese:**
```
✓ 提交并推送成功
分支:[branch]
提交信息:[commit message]
版本标签:[tag] (如果创建了)
已推送到远程仓库origin
- 提交:[commit hash]
- 标签:[tag]
```
**Error handling:**
- If staging area is empty: "暂存区为空,请先使用 `git add` 添加文件。"
- If push fails (e.g., need to pull first): Show error in Chinese with suggested solutions
- If remote rejects tag (already exists): Show error and suggest deleting local tag or updating version
**Options:**
- User can input "skip tag" or "skip" to skip tag creation
**When to use:**
- `/git-commit`: Local only, review before pushing
- `/git-push`: Commit and push immediately
- `/git-push-tags`: Push tags only (no commits)