description: Commit changes with Conventional Commits format and push to GitHub remote repository.
Update GitHub
Commit uncommitted changes and push to remote GitHub repository.
Instructions
-
Check Git Status
- Run
git status - Show all uncommitted changes
- Run
-
Analyze Changes
- Review changed files
- Determine commit type (feat/fix/docs/refactor/test/chore)
- Determine scope (affected module/component)
-
Create Commit Message Follow Conventional Commits format:
<type>(<scope>): <subject> <body> <footer>Types:
feat: 新功能fix: Bug 修复docs: 文档更新refactor: 代码重构perf: 性能优化test: 测试相关chore: 其他修改
-
Stage and Commit
- Run
git addfor affected files - Create commit with formatted message
- Do not include
Co-Authored-Byfooters unless the user explicitly asks for them
- Run
-
Push to Remote
- Run
git push - If rejected, pull with rebase first:
git pull --rebase origin $(git branch --show-current) git push
- Run
-
Verify Success
- Show commit SHA
- Show remote branch status
Example Usage
User: /update-github
1. Checking git status...
Modified: src/utils/helpers.py
Modified: README.md
2. Analyzing changes...
- src/utils/helpers.py: Refactored helper functions
- README.md: Updated documentation
3. Proposed commit:
docs(readme): 更新项目文档
- 添加使用示例
- 更新依赖说明
4. Proceed? (yes/no/modify)
5. Staging files...
git add src/utils/helpers.py README.md
6. Creating commit...
[main abc1234] docs(readme): 更新项目文档
7. Pushing to remote...
git push
To github.com:user/repo.git
abc1234..def5678 main -> main
✅ Successfully pushed to GitHub!
Arguments
$ARGUMENTS can be:
--amend- Amend last commit instead of creating new one--no-verify- Skip pre-commit hooks<type>(<scope>): <message>- Use custom commit message
Integration
This command uses the same Conventional Commits format as the /commit skill but focuses on the complete flow: stage → commit → push.