Skip to content

chore: .claude/worktrees/ を gitignore する - #309

Merged
touyou merged 1 commit into
mainfrom
chore/gitignore-claude-worktrees
Aug 26, 2026
Merged

chore: .claude/worktrees/ を gitignore する#309
touyou merged 1 commit into
mainfrom
chore/gitignore-claude-worktrees

Conversation

@touyou

@touyou touyou commented Aug 26, 2026

Copy link
Copy Markdown
Member

背景

Claude Code の作業用 git worktree は .claude/worktrees/<name> に作られるが、このリポジトリの .gitignore には登録されていなかった。

現状 .claude/worktrees/ は空ディレクトリなので git status には出ていないが、worktree を 1 つ作った時点で ?? .claude/worktrees/ が出るようになり、git add -A で worktree 一式を誤ってコミットしうる。

sparkle-design-cli 側で同じ問題が実際に起きたので、ワークスペース全体で揃える目的の予防的な追加。

変更

.gitignore.claude/worktrees/ を追加。既存の .claude/skills/* allowlist ブロックの直前に置いた(.claude 系のエントリをまとめるため。allowlist の挙動には影響しない)。

パターンの表記(末尾スラッシュあり・先頭スラッシュなし)は、既に同じ行を持っている sparkle-design-internal.gitignore に揃えた。

他リポジトリの状況

リポジトリ 状況 対応
sparkle-design 未登録 本 PR
sparkle-design-cli 未登録 goodpatch/sparkle-design-cli#87
sparkle-design-internal .gitignore:8 に登録済み 対応不要

検証

  • git check-ignore -v .claude/worktrees/_probe.gitignore:74 でヒットすることを確認
  • .gitignore のみの変更でビルド成果物・追跡中ファイルへの影響はなし(git status に既存の追跡ファイルが新たに ignore される差分は出ていない)

🤖 Generated with Claude Code

Claude Code の作業用 git worktree は .claude/worktrees/<name> に作られるが
gitignore されていないため、worktree を作った時点で git status に
`?? .claude/worktrees/` が出て `git add -A` で誤ってコミットされうる。

パターンの表記は既に追加済みの sparkle-design-internal に揃えた。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 26, 2026 07:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sparkle-design Ready Ready Preview Aug 26, 2026 7:36am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 32 minutes.

View limit details

Limit details: You’ve used all 5 included reviews currently available. Your 17 included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5138baac-cc8b-4c4d-9bec-b1c459ecbcc6

📥 Commits

Reviewing files that changed from the base of the PR and between e8d03e9 and f5124ab.

📒 Files selected for processing (1)
  • .gitignore

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5124ab7bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .gitignore
# package manager lock files
# pnpm-lock.yaml

# Claude Code の作業用 git worktree(.claude/worktrees/<name> に作成される)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the required English translation to this comment

This newly added comment is Japanese-only, while the repository requires comments to put Japanese first and then provide English with an en: prefix. Add the corresponding en: comment so the checked-in configuration follows the documented bilingual comment convention.

AGENTS.md reference: AGENTS.md:L65-L67

Useful? React with 👍 / 👎.

@touyou
touyou merged commit 98a436f into main Aug 26, 2026
5 checks passed
@touyou
touyou deleted the chore/gitignore-claude-worktrees branch August 26, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants