rebase-current-branch
하는 일
이 도구는 '브랜치'(별도의 작업 줄기)를 프로젝트 주 브랜치의 최신 변경 사항을 포함하도록 업데이트합니다. 여러분의 작업이 사라지지 않도록 안전하게 진행합니다.
사용하는 경우
- ✓주 브랜치의 최신 변경 사항을 내 작업에 반영하고 싶을 때.
- ✓코드 리뷰를 요청하기 전에.
- ✓내 작업을 팀의 작업과 병합하고 싶을 때.
스킬 링크
https://github.com/github/awesome-copilot/blob/main/skills/rebase-current-branch/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“주 브랜치의 최신 변경 사항을 내 작업에 반영해 주세요.”
매주 새 스킬 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 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
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.