AgentSkillsCN

Git Workflows

本地 Git 操作:同步、分支、合并与冲突解决

SKILL.md
--- frontmatter
name: "Git Workflows"
description: "Local git operations for syncing, branching, merging, and conflict resolution"
triggers:
  - "git workflow"
  - "git help"
  - "git operations"
user_invocable: true

Git Workflows

A comprehensive suite of git workflow skills for local repository operations.

Available Skills

Sync & Remote Operations

SkillPurposeInvoke
/git-syncFetch and show remote changesgit sync, what's new upstream
/git-pullPull with merge/rebase strategygit pull, get latest
/git-pushPush with upstream handlinggit push, push changes

Stash Management

SkillPurposeInvoke
/git-stashSave/pop/list stashed changesgit stash, save my work

Branch Operations

SkillPurposeInvoke
/git-branchCreate branches with naming conventionsgit branch, new branch
/git-switchSwitch branches safelygit switch, checkout branch
/git-branchesList and visualize branch statusgit branches, list branches
/git-delete-branchDelete local/remote with safetydelete branch, cleanup branch

Integration & Merging

SkillPurposeInvoke
/git-merge-mainMerge main into feature branchmerge main, update from main
/git-rebaseRebase onto main with guidancegit rebase, rebase onto main
/git-squashSquash commits non-interactivelygit squash, clean up commits

Conflict & Recovery

SkillPurposeInvoke
/git-abortAbort failed merge/rebase/cherry-pickgit abort, cancel merge
/git-conflictsGuided conflict resolutiongit conflicts, fix conflicts

Quick Reference

bash
# Sync workflow
/git-sync              # See what's new
/git-pull              # Get changes
/git-push              # Push changes

# Branch workflow
/git-branch feat/xyz   # Create branch
/git-switch main       # Switch branch
/git-branches          # See all branches

# Integration
/git-merge-main        # Update from main
/git-rebase            # Rebase on main
/git-squash            # Clean up history

Related Skills

  • /commit - Create commits with conventional messages
  • /commit-push-pr - Full commit, push, and PR workflow
  • /gh-pr-* - GitHub PR operations