用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill git-sync命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | git-sync |
| description | Fetch and show remote changes without modifying local branch Use when this capability is needed. |
| metadata | {"author":"dtsong"} |
git fetch --prune which updates remote tracking refs and removes stale ones.., shell metacharacters, or null bytes.--all accepted. Reject arbitrary strings.Fetch the latest changes from remote without modifying your local branch. Shows what's new upstream.
/git-sync # Fetch all remotes and show status
/git-sync origin # Fetch specific remote
/git-sync --all # Fetch all remotes including tags
# Fetch from all remotes with prune
git fetch --all --prune
# Get current branch
git branch --show-current
# Check remote tracking status
git status -sb
# Get the remote tracking branch
REMOTE_BRANCH=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)
# If tracking branch exists, show difference
if [ -n "$REMOTE_BRANCH" ]; then
# Commits behind (on remote but not local)
git log --oneline HEAD..$REMOTE_BRANCH
# Commits ahead (on local but not remote)
git log --oneline $REMOTE_BRANCH..HEAD
fi
# Files that would change on pull
git diff --stat HEAD..@{u} 2>/dev/null
Fetched from origin, upstream
Current branch: feat/dark-mode
Tracking: origin/feat/dark-mode
Behind by 3 commits:
abc1234 Fix theme persistence
def5678 Update color palette
ghi9012 Add system theme detection
Ahead by 1 commit:
xyz7890 WIP: toggle component
Files that would change on pull:
src/theme/colors.ts | 12 ++++++------
src/hooks/useTheme.ts | 45 +++++++++++++++++++++++++++++++++++++++++++++
Next steps:
/git-pull # Pull the changes
/git-stash # Stash local changes first
Branch 'feat/local-only' has no upstream tracking branch.
To set tracking:
git branch --set-upstream-to=origin/feat/local-only
Or push with tracking:
git push -u origin feat/local-only
Current branch: main
Tracking: origin/main
Already up to date.
Failed to fetch from origin: Could not resolve host: github.com
Check your network connection and try again.
/git-pull to apply the fetched changes/git-stash if you have uncommitted changes to save first/git-branches to see status of all branchesConverted and distributed by TomeVault — claim your Tome and manage your conversions.