git-push
适用于 GitHub 和 Azure DevOps 的多远程 git 推送工作流程。当用户说“推送到 github”、“推送到 azure”、“推送到原点”、“推送到辅助”、“推送到 devops”、“推送到两者”、“同步远程”或请求 git 推送操作的任何变体时使用。处理从 Azure 中排除 .claude/、specs/ 和 CLAUDE.md 的 azure-sync 分支工作流。
📖 中文导读:适用于 GitHub 和 Azure DevOps 的多远程 git 推送工作流程。当用户说“推送到 github”、“推送到 azure”、“推送到原点”、“推送到辅助”、“推送到 devops”、“推送到两者”、“同步远程”或请求 git 推送操作的任何变体时使用。处理从 Azure 中排除 .claude/、specs/ 和 CLAUDE.md 的 azure-sync 分支工作流。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: git-push description: | Multi-remote git push workflow for GitHub and Azure DevOps. Use when the user says "push to github", "push to azure", "push to origin", "push to secondary", "push to devops", "push to both", "sync remotes", or any variation requesting git push operations. Handles the azure-sync branch workflow that excludes .claude/, specs/, and CLAUDE.md from Azure.
Git Multi-Remote Push
Remotes
| Remote | Platform | Branch |
|---|---|---|
origin |
GitHub | main (full repo) |
secondary |
Azure DevOps | main (excludes .claude/, specs/, CLAUDE.md) |
Push Workflows
GitHub (origin)
git push origin main
Azure DevOps (secondary)
Azure excludes .claude/, specs/, and CLAUDE.md. Use the persistent azure-sync branch:
# Update azure-sync from main, remove excluded files, push
git checkout -B azure-sync main && \
git rm -r .claude CLAUDE.md specs 2>/dev/null || true && \
git commit -m "chore: sync to Azure (excludes .claude, CLAUDE.md, specs)" && \
git push secondary azure-sync:main --force && \
git checkout main --force
Both Remotes
# GitHub first
git push origin main
# Then Azure (filtered)
git checkout -B azure-sync main && \
git rm -r .claude CLAUDE.md specs 2>/dev/null || true && \
git commit -m "chore: sync to Azure (excludes .claude, CLAUDE.md, specs)" && \
git push secondary azure-sync:main --force && \
git checkout main --force
Pre-Push Checklist
- Check for uncommitted changes:
git status - If changes exist, commit them first (no AI metadata in commit messages)
- Then push
Commit Message Format
<type>(<scope>): <description>
Types: feat, fix, refactor, test, docs, chore
No AI metadata - no "Generated with Claude", no "Co-Authored-By: Claude", no emojis.
Intent Mapping
| User Says | Action |
|---|---|
| "push to github" / "push to origin" | git push origin main |
| "push to azure" / "push to secondary" | Use azure-sync workflow |
| "push to both" / "sync remotes" | Push to origin, then azure-sync workflow |