Conversation
This was referenced Sep 9, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WU6a447YMHF72RTcCDW2nr
워크트리가 물고 있는 브랜치는 남의 작업 공간이라 당기지 않는다. worktree- 로 시작하는 브랜치도 삭제 후보에서 뺀다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WU6a447YMHF72RTcCDW2nr
지우는 브랜치는 전부 origin/main 의 조상이라 커밋이 사라지지 않는다. 되살리기가 git branch <이름> <sha> 한 줄이라 승인을 물을 이유가 없다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WU6a447YMHF72RTcCDW2nr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34
무엇을 바꿨나
.claude/commands/sync.md를 추가했다./sync는main과 현재 브랜치를origin/main·각자의 upstream 까지 fast-forward 하고, 병합이 끝난 로컬 브랜치를 지운다.
main과 현재 브랜치뿐이다. 다른 워크트리가 물고 있는 브랜치는 당기지 않는다.남의 작업 공간에서 파일이 발밑에서 바뀌는 것을 막는다.
main이 다른 워크트리에 체크아웃돼 있으면git fetch origin main:main이 거부당한다.그래서
main이 어디 있는지 먼저 보고, 다른 워크트리에 있으면 거기서 fast-forward 한다.git branch -d가 아니라git merge-base --is-ancestor <브랜치> origin/main이한다.
-d는 현재 HEAD 와 upstream 만 보기 때문에,origin/main에 들어갔지만 지금 HEAD히스토리엔 없는 브랜치를 거부한다. ancestor 확인을 통과한 브랜치에만
-D를 쓴다.main, 현재 브랜치, 워크트리가 물고 있는 브랜치,worktree-로 시작하는 브랜치는 지우지 않는다.묻지 않고 바로 지우고, 지운 브랜치의 sha 를 함께 출력한다. 지우는 브랜치는 전부
origin/main의 조상이라 커밋이 사라지지 않고,git branch <이름> <sha>한 줄로 되살아난다.확인
프로덕션 코드가 바뀌지 않아 테스트를 추가하지 않았다.
npm test영향 없음.2번 단계의
main최신화는 이 브랜치를 만들기 전에 실제로 돌려 확인했다.main이 메인 워크트리에 체크아웃된 상태에서31ebac6 → 4abfe37로 fast-forward 됐다.미확인
/sync전체를 한 번에 돌린 결과. 3~4번(대상 선정과 삭제)은 실행하지 않았다.이 브랜치를 체크아웃한 세션에서
/sync를 돌려, 삭제 대상에서main· 현재 브랜치 ·워크트리 점유 브랜치 ·
worktree-*가 빠지는지 확인해야 한다.🤖 Generated with Claude Code
https://claude.ai/code/session_01WU6a447YMHF72RTcCDW2nr