rebase-current-branch
Что он делает
Этот инструмент обновляет вашу «ветку» (отдельную линию работы), добавляя в нее последние изменения из основной ветки проекта. Он делает это безопасно, чтобы ваша работа не потерялась.
Когда использовать
- ✓Когда вы хотите включить в свою работу последние изменения из основной ветки.
- ✓Перед тем как попросить кого-то проверить ваш код.
- ✓Когда вы хотите объединить свою работу с работой команды.
Ссылка на скилл
https://github.com/github/awesome-copilot/blob/main/skills/rebase-current-branch/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Обнови мою работу последними изменениями из основной ветки.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Инструмент сначала проверяет, есть ли несохраненная работа, и спрашивает, что с ней делать. Затем он загружает последние изменения из основной ветки и применяет их поверх вашей работы, сохраняя все в порядке.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Rebase the Current Branch
Update the active branch by replaying its commits on top of the latest default branch from its upstream remote. Use the repository's actual default branch, whether it is named main, master, or another branch.
Workflow
Inspect before changing anything. Run
git status --porcelain=v1 --branch --untracked-files=allandgit branch --show-current. Confirm the current branch is not the default branch and note any local changes. If the working tree has changes, stop and ask the user whether to commit, stash, or otherwise handle them. Do not stash automatically.Identify the upstream and default branch. Check
git remote -vandgit remote show <remote>(or the remote's symbolicHEAD) to determine the branch this repository treats as its default. Prefer the configured upstream for the current branch when available; otherwise useorigin. Do not assume thatmainexists or that a branch namedmasteris current. If the default branch cannot be identified unambiguously, ask the user.Fetch the latest default branch. Fetch only the identified remote and default branch, for example:
git fetch <remote> <default-branch>Verify the fetched remote-tracking ref exists before continuing.
Rebase the active branch. Tell the user which branch will be rebased onto which remote-tracking branch, then run:
git rebase <remote>/<default-branch>Handle conflicts without discarding work. If the rebase stops, explain which files conflict and that the rebase is paused. Resolve only when the intended changes are clear; otherwise ask the user. After resolution, stage the resolved files and run
git rebase --continue. If the user wants to abandon the operation, rungit rebase --abort. Never usegit reset --hard, discard user changes, or skip commits to force completion.Offer validation hooks. After the rebase succeeds, inspect the repository's documented validation steps and configured hooks (for example, pre-commit hooks or lint and test scripts). Ask the user whether they want those checks run before proceeding. If they agree, run the applicable checks and report their results; do not bypass or disable hooks.
Verify the result. When the rebase completes, run
git status --porcelain=v1 --branch --untracked-files=alland summarize the outcome, including the base branch used, validation results if run, and any remaining changes. Do not push, force-push, or amend commits unless the user separately asks.
Quick Path
For a clean working tree where the upstream default branch is known, the core operation is:
git fetch <remote> <default-branch>
git rebase <remote>/<default-branch>
Replace <default-branch> with the detected branch name (main, master, or another configured default). Never run the placeholder commands literally.
Safety Rules
- Preserve the user's current branch and uncommitted work.
- Do not rebase the default branch itself.
- Do not assume local
mainormasteris up to date; rebase onto the fetched remote-tracking branch. - Do not push or force-push as part of this workflow.
- If a rebase is already in progress, inspect its state and ask whether to continue or abort; do not start another rebase.
Частые вопросы
Что такое «ветка»?
Представьте ветку как копию проекта, в которой можно работать, не затрагивая основную версию. Это как черновик для внесения изменений.
Что означает «rebase»?
«Rebase» (перебазирование) похоже на изменение порядка вашей работы. Вместо простого слияния ваши изменения ставятся «поверх» последних обновлений, как будто вы начали работу после них.
Что делать, если возникают конфликты?
Конфликт возникает, если ваша работа и обновления в основной ветке изменили одну и ту же часть кода. Инструмент сообщит вам об этом и попросит помочь решить, какую версию оставить.
Подробности
Оригинальное описание автора
Rebase the currently checked out feature branch onto the latest upstream default branch. Use when asked to update a branch with main or master, rebase the current branch onto the default branch, or sync a feature branch before review. Detects whether the repository uses main or master and guides safe conflict handling.
repo: github/awesome-copilot
Популярность
- Звёзды на GitHub
- 40k
- Место в рейтинге
- #7393
- Лицензия
- MIT
- Обновлён
- 15.10.2026
Комментарии
- …
Другие скиллы из этого репозитория
acquire-codebase-knowledge
40kПомогает агенту понять и задокументировать существующий проект.
acreadiness-assess
40kАгент оценивает готовность проекта к работе с ИИ и составляет отчёт.
acreadiness-generate-instructions
40kПомогает агенту создать инструкции для ИИ-инструментов по итогам оценки.
acreadiness-policy
40kАгент помогает задавать политики оценки ИИ-готовности проектов.
Похожие скиллы
openclaw-update
394kПомогает агенту обновить уже работающий OpenClaw Gateway, выбрав способ обновления по тому, как он был установлен, и сохранив вашу сессию.
diagnose-gateway
394kПомогает агенту выяснить, почему ваш OpenClaw Gateway не работает, проверяя настройки, каналы и порты, но ничего не меняя.
crabbox-apps
394kПомогает агенту открыть и запустить приложение на временной облачной машине, а затем показать его вид на боковой панели чата.