Skip to content

Add more Claude Code files to .gitignore#8249

Open
lucaspimentel wants to merge 2 commits intomasterfrom
lpimentel/git-ignore-claude-worktrees
Open

Add more Claude Code files to .gitignore#8249
lucaspimentel wants to merge 2 commits intomasterfrom
lpimentel/git-ignore-claude-worktrees

Conversation

@lucaspimentel
Copy link
Member

@lucaspimentel lucaspimentel commented Feb 27, 2026

Summary of changes

Add .claude/worktrees and *.local.* to .gitignore.

Reason for change

Claude Code creates temporary git worktrees under .claude/worktrees/ for isolated agent work. These should not be tracked in git.

Local files like settings.local.json and local Hookify files (hookify.*.local.md) shouldn't be tracked, either.

Implementation details

Add .claude/worktrees and *.local.* to .gitignore.

Test coverage

N/A — .gitignore only change.

Other details

NOTE: this PR will auto-merge after the first approval.

"I tried to push my worktree to remote, but git said it was already branching out on its own." — Claude 🤖

@lucaspimentel lucaspimentel requested a review from a team as a code owner February 27, 2026 17:41
@lucaspimentel lucaspimentel changed the title Add .claude/worktrees to .gitignore Add .claude/worktrees to .gitignore Feb 27, 2026
@lucaspimentel lucaspimentel enabled auto-merge (squash) February 27, 2026 17:55
@pr-commenter
Copy link

pr-commenter bot commented Feb 27, 2026

Benchmarks

Benchmark execution time: 2026-02-28 03:49:26

Comparing candidate commit a17fa48 in PR branch lpimentel/git-ignore-claude-worktrees with baseline commit f68122e in branch master.

Found 5 performance improvements and 9 performance regressions! Performance is the same for 161 metrics, 17 unstable metrics.

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+88.110ms; +88.174ms] or [+79.818%; +79.877%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472

  • 🟩 throughput [+253384.981op/s; +282380.459op/s] or [+8.834%; +9.845%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-19.546ms; -13.325ms] or [-9.055%; -6.173%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • 🟥 throughput [-1490.728op/s; -715.672op/s] or [-14.296%; -6.863%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0

  • 🟥 execution_time [+164.363µs; +170.197µs] or [+11.796%; +12.214%]
  • 🟥 throughput [-78.249op/s; -75.595op/s] or [-10.903%; -10.533%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472

  • 🟥 execution_time [+199.729µs; +206.351µs] or [+7.794%; +8.053%]
  • 🟥 throughput [-29.117op/s; -28.187op/s] or [-7.461%; -7.223%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery netcoreapp3.1

  • 🟥 throughput [-32893.733op/s; -26562.409op/s] or [-8.134%; -6.568%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟩 execution_time [-35.897ms; -32.986ms] or [-17.864%; -16.416%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟥 execution_time [+97.789ms; +100.382ms] or [+100.083%; +102.737%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+81960.682op/s; +113000.253op/s] or [+8.022%; +11.060%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1

  • 🟩 execution_time [-21.282ms; -15.821ms] or [-9.902%; -7.361%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟥 execution_time [+15.513ms; +20.650ms] or [+7.858%; +10.461%]

@lucaspimentel lucaspimentel added the ai-agents 🤖 files used by AI agents label Feb 27, 2026
@lucaspimentel lucaspimentel force-pushed the lpimentel/git-ignore-claude-worktrees branch from 91820cf to a17fa48 Compare February 28, 2026 03:06
@lucaspimentel lucaspimentel changed the title Add .claude/worktrees to .gitignore Add more Claude Code files to .gitignore Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-agents 🤖 files used by AI agents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant