본문으로 건너뛰기
cccskills
무료GitHub에 공개

rebase

Rebase a branch onto another — resolve merge conflicts carefully by inspecting each conflict individually. Use when rebasing, restacking, or resolving merge conflicts.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ayunis-core/ayunis-core스타 34(GitHub 34 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Rebase & Conflict Resolution

Golden Rule

NEVER blindly accept "ours" or "theirs" for all conflicts. Every conflict must be inspected individually and resolved with a conscious decision based on understanding both sides.

Blanket strategies like git checkout --ours . or git checkout --theirs . or scripted mass-resolution are strictly forbidden. They silently discard work and introduce subtle bugs.

Rebasing with Graphite

This project uses Graphite (see git-workflow skill). Prefer Graphite commands:

# Restack the current stack onto latest main
gt restack

# If you need to rebase onto a specific branch
gt restack --onto <branch>

If raw git rebase is needed (rare):

git rebase <target-branch>

Resolving Conflicts — Step by Step

When a rebase stops on a conflict:

1. Identify all conflicting files

git diff --name-only --diff-filter=U

2. For EACH conflicting file, understand the context

Before touching the file, understand what both sides intended:

# What did OUR side change in this file? (the branch being rebased)
git log --oneline HEAD -- <file>
git diff HEAD~1 HEAD -- <file>   # or check relevant commits

# What did THEIR side change? (the target branch)
git log --oneline REBASE_HEAD..HEAD -- <file>  # commits on target affecting this file

3. Open the file and read the conflict markers

<<<<<<< HEAD
(their version — what's on the target branch)
=======
(our version — what's on the branch being rebased)
>>>>>>> <commit>

Read both sides completely. Understand the intent of each change.

4. Make a conscious resolution decision

For each conflict hunk, decide:

  • Keep ours — if our change is the correct/newer behavior
  • Keep theirs — if their change supersedes ours
  • Merge both — if both changes are needed (most common with adjacent edits)
  • Rewrite — if neither side is correct after the merge

State your reasoning for non-trivial conflicts (e.g., "keeping theirs because this function was refactored on main and our change targeted the old signature").

5. After resolving each file

git add <file>

6. After all files are resolved

git rebase --continue

If more conflicts arise on the next commit, repeat from step 1.

Common Conflict Patterns

Lock files (package-lock.json, pnpm-lock.yaml)

Don't manually resolve. Accept either side and regenerate:

git checkout --theirs pnpm-lock.yaml   # or package-lock.json for npm repos
pnpm install                           # use the repo's package manager: pnpm for ayunis-core, npm otherwise
git add pnpm-lock.yaml

Auto-generated files (migrations, GraphQL schema, OpenAPI/Orval client)

Accept theirs (mainline version), then regenerate. Do NOT hand-merge these files — even if the conflict looks small, splicing "ours" and "theirs" regions of a generated file is almost always wrong: the generator produces the file as one atomic unit, and a merged version will drift from any source of truth on both sides.

Applies to (non-exhaustive):

  • Database migrations
  • GraphQL schema and generated types
  • The Orval-generated OpenAPI client in ayunis-core — packages/api-client/src/generated/ayunisCoreAPI.ts, ayunisCoreAPI.schemas.ts, openapi-schema.json. Take theirs, then follow the fix-schema-drift skill (boot the backend from the rebased worktree, then pnpm run openapi:update).
  • Package lock files (pnpm-lock.yaml, package-lock.json) — see the next subsection for the specific recipe.

If in doubt whether a file is generated, check for a header comment like AUTOGENERATED — DO NOT EDIT, look at its .gitattributes entry, or check whether the surrounding package has a generate / codegen npm script that emits it.

Import ordering / formatting

If the only difference is formatting or import order, accept theirs and let the formatter/linter re-apply on the next commit.

What to Do When Conflicts Are Overwhelming

If a rebase produces dozens of conflicts across many files:

  1. Stop and assess — git rebase --abort is always an option
  2. Inform the user — describe the scope: how many files, which areas of code
  3. Propose a strategy — e.g., interactive rebase to squash first, or rebase commit-by-commit
  4. Never take shortcuts — even if there are 50 conflicts, each one gets individual attention

Forbidden Practices

  • ❌ git checkout --ours . or git checkout --theirs .
  • ❌ xargs git checkout --ours or any scripted bulk resolution
  • ❌ Accepting all changes from one side without reading the diffs
  • ❌ Using rerere results without verifying they're still correct
  • ❌ Skipping conflict review because "it's just formatting"
  • ❌ Using --strategy-option=ours or --strategy-option=theirs on the entire rebase

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Query Ayunis deployed-environment telemetry in AppSignal — incidents, occurrence counts and error traces via the `appsignal-cli` binary; structured log attributes (user.id, org.id, nestjs.context, custom metadata) via the v2 logs API. Use when investigating a production/staging incident or log data — NOT for local dev logs (see backend-debugging).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ayunis-core/ayunis-core342026년 10월 26일 업데이트

Ayunis Core backend specifics — module boundaries, key files, and project conventions. Complements the nestjs-hexagonal-backend skill.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ayunis-core/ayunis-core342026년 10월 26일 업데이트

Frontend development in ayunis-core. Use when creating, modifying, or debugging frontend code (React, Feature-Sliced Design, API client).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ayunis-core/ayunis-core342026년 10월 26일 업데이트

Debug backend runtime errors (500s, crashes, unexpected behavior). Use when something is broken at runtime — not for writing new code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ayunis-core/ayunis-core342026년 10월 26일 업데이트

Shared test fixtures for backend specs — port mock factories, domain builders, and shared IDs in a per-module testing/ folder. Use when a module's *.use-case.spec.ts files repeat the same mock-repository literal, inline entity construction, or hardcoded UUIDs across files.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ayunis-core/ayunis-core342026년 10월 26일 업데이트

Analyze Cursor Bugbot PR comments through a root-cause lens: is the finding valid, and is the suggested fix the real fix or a bandaid over a deeper problem? Use when the user asks to check, assess, or triage bugbot comments.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ayunis-core/ayunis-core342026년 10월 26일 업데이트

ayunis-core의 스킬 모두 보기

이 스킬의 문제 신고