dev-update-working-branch
Update the current working branch with the latest main. Fetches origin/main, updates local main, and rebases the current branch onto main.
от Nebulavenus★ 51 звезда на GitHub
Установить dev-update-working-branch в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Update the current working branch with the latest changes from main.
Fetches origin/main, fast-forwards local main, and rebases the
current feature branch onto main for clean linear history.
When to use
- Before pushing fixes during
/dev-review-prwhen the branch is behind - Before running
/dev-resolve-feedback(must update before resolving) - Any time GitHub shows the branch is behind main
- Before creating a PR to minimize merge conflicts
Workflow
1. Verify on a feature branch
BRANCH=$(git branch --show-current)
If on main, report "Already on main — use git pull instead" and stop.
Check for uncommitted or untracked changes:
test -z "$(git status --porcelain=v1 --untracked-files=all)"
If the output is non-empty, report "Uncommitted changes detected — commit or stash before updating" and stop. This catches tracked modifications, staged changes, and untracked files (which can cause "would be overwritten by rebase" errors).
2. Fetch and update local main
git fetch origin main
git branch -f main origin/main
This updates local main to match origin/main without switching
branches. The -f flag forces the update (safe because we are not on
main).
3. Rebase onto main
git rebase main
If there are conflicts, report them and stop — the user must resolve
manually with git rebase --continue or git rebase --abort.
4. Report result
Updated <branch-name> with latest main.
- Fetched origin/main
- Local main updated to <commit>
- Rebased <branch-name> onto main
- <N> new commits from main
Rebase rewrites history — push with: git push --force-with-lease
If the rebase was a no-op (already up to date), report that instead.
What it does NOT do
- It does NOT push — the user decides when to push
- It does NOT switch to main — stays on the current branch
- It does NOT resolve conflicts — reports them for manual resolution
Safety
- Refuses to run if on
main(nothing to rebase) - Refuses to run if there are uncommitted changes (rebase would fail)
- Uses rebase for clean linear history (force-push required after)
- Does not modify remote state
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dev-update-working-branch?
Update the current working branch with the latest main. Fetches origin/main, updates local main, and rebases the current branch onto main.
Как установить скилл dev-update-working-branch?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dev-update-working-branch запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…