用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/autohandai/community-skills --skill git-workflow-mastery命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Build, convert, validate, and install Autohand extensions, including Pi adaptations.
Run Weizhena's Deep Research workflow in Autohand Code for outline generation, deep web investigation, structured evidence capture, and final research reports.
Use Aaronontheweb dotnet-skills for Claude Code-oriented .NET maintenance, refactoring, and agent workflows.
正在显示 SKILL.md
基于 SOC 职业分类
| name | git-workflow-mastery |
| description | Advanced Git workflows, branching strategies, and commit conventions |
| license | MIT |
| compatibility | git 2.30+ |
| allowed-tools | run_command read_file write_file |
main ────●────●────●────●────●────
\ /
feature ●───●───●
Best for: Continuous deployment, small teams
main ────●─────────────────●────
\ /
release ●─────●───────●
\ /
develop ────●───●───●───●───●────
\ /
feature ●───●
Best for: Scheduled releases, larger teams
# Feature branches
feature/user-authentication
feature/JIRA-123-add-login
# Bug fixes
fix/login-redirect-loop
fix/JIRA-456-null-pointer
# Releases
release/v1.2.0
release/2024-q1
# Hotfixes
hotfix/security-patch
hotfix/v1.2.1
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
feat: # New feature
fix: # Bug fix
docs: # Documentation only
style: # Formatting, no code change
refactor: # Code change without feature/fix
perf: # Performance improvement
test: # Adding/updating tests
chore: # Build process, dependencies
ci: # CI configuration
revert: # Revert previous commit
# Simple
feat(auth): add OAuth2 login support
# With body
fix(api): handle null response from external service
The external payment API occasionally returns null
instead of an error object. Added defensive check.
Fixes #234
# Breaking change
feat(api)!: change response format to JSON:API
BREAKING CHANGE: All API responses now follow JSON:API spec.
Clients need to update their parsers.
# Squash last 3 commits
git rebase -i HEAD~3
# In editor:
pick abc1234 First commit
squash def5678 Second commit
squash ghi9012 Third commit
# Apply specific commit to current branch
git cherry-pick abc1234
# Cherry pick range
git cherry-pick abc1234..def5678
# Save work in progress
git stash push -m "WIP: feature login"
# List stashes
git stash list
# Apply and remove
git stash pop
# Apply specific stash
git stash apply stash@{2}
# Undo last commit (keep changes)
git reset --soft HEAD~1
# Undo last commit (discard changes)
git reset --hard HEAD~1
# Undo a pushed commit (new revert commit)
git revert abc1234
# Discard all local changes
git checkout -- .
git clean -fd
git bisect start
git bisect bad # Current commit is broken
git bisect good v1.0.0 # Known good commit
# Git checks out middle commit
# Test and mark:
git bisect good # or
git bisect bad
# Continue until bug found
git bisect reset
# View reflog
git reflog
# Recover deleted branch
git checkout -b recovered-branch abc1234
# Undo hard reset
git reset --hard HEAD@{2}
# Create worktree for feature branch
git worktree add ../feature-branch feature/new-ui
# List worktrees
git worktree list
# Remove worktree
git worktree remove ../feature-branch
#!/bin/sh
# .git/hooks/pre-commit
# Run linter
npm run lint
if [ $? -ne 0 ]; then
echo "Lint failed. Commit aborted."
exit 1
fi
# Run tests
npm test
if [ $? -ne 0 ]; then
echo "Tests failed. Commit aborted."
exit 1
fi
#!/bin/sh
# .git/hooks/commit-msg
# Validate conventional commit format
commit_regex='^(feat|fix|docs|style|refactor|perf|test|chore|ci|revert)(\(.+\))?: .{1,72}'
if ! grep -qE "$commit_regex" "$1"; then
echo "Invalid commit message format."
echo "Use: type(scope): description"
exit 1
fi
# ~/.gitconfig
[alias]
co = checkout
br = branch
ci = commit
st = status
lg = log --oneline --graph --decorate
undo = reset --soft HEAD~1
amend = commit --amend --no-edit
wip = !git add -A && git commit -m 'WIP'
sync = !git fetch origin && git rebase origin/main