rebase-latest-main
БесплатноБез исполняемых скриптовНе проверенFetch latest origin/main and rebase it onto the current branch, resolving conflicts if necessary. Use when the user wants to rebase on main, update their…
от dyoshikawa★ 1 671 звезда на GitHubОб этом скилле
Rebase Latest Main
Fetch the latest origin/main and rebase it onto the current working branch.
Step 1: Verify Current State
Check the current branch:
git branch --show-currentEnsure there are no uncommitted changes:
git status --porcelainIf there are uncommitted changes, either:
- Commit them first, or
- Ask the user how to proceed (commit, stash, or abort)
Step 2: Fetch Latest Changes
Fetch the latest changes from the remote:
git fetch origin main
Step 3: Rebase onto origin/main
Start the rebase:
git rebase origin/main
If rebase succeeds without conflicts:
Proceed to Step 5.
If conflicts occur:
Identify conflicting files:
git diff --name-only --diff-filter=UFor each conflicting file:
- Read the file content to understand the conflict
- Analyze both versions (HEAD and origin/main)
- Resolve the conflict by choosing the appropriate changes or merging them
- Stage the resolved file:
git add <resolved-file>
Continue the rebase:
git rebase --continueRepeat until all conflicts are resolved and rebase is complete.
Step 4: Handle Rebase Failure
If unable to resolve conflicts automatically:
- Show the conflicting files and conflict markers to the user
- Ask for guidance on how to resolve
- If the user wants to abort:
git rebase --abort
Step 5: Push Changes
After successful rebase, force push to update the remote branch:
git push --force-with-lease
Note: --force-with-lease is safer than --force as it prevents overwriting others' work.
Step 6: Report Result
Summarize the operation:
- Number of commits rebased
- Any conflicts that were resolved
- Confirmation that the branch is now up-to-date with origin/main
Установить rebase-latest-main в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rebase-latest-main?
Fetch latest origin/main and rebase it onto the current branch, resolving conflicts if necessary. Use when the user wants to rebase on main, update their branch with latest main, or sync with upstream.
Как установить скилл rebase-latest-main?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rebase-latest-main запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set 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…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic