Skip to content

chore: ignore nested git worktree checkouts - #566

Open
qnbs wants to merge 1 commit into
mainfrom
chore/gitignore-worktree-dirs
Open

chore: ignore nested git worktree checkouts#566
qnbs wants to merge 1 commit into
mainfrom
chore/gitignore-worktree-dirs

Conversation

@qnbs

@qnbs qnbs commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • .worktrees/ (the git worktree add target directory used throughout local development) was not in the root .gitignore, so the primary checkout's git status collapsed every nested worktree's full content into one opaque untracked-directory line.
  • This is a real risk for an accidental git add -A picking up nested worktree checkouts (each with their own .git file, node_modules, etc.).

Test plan

  • git status in the primary checkout no longer lists .worktrees/ as untracked content.
  • No other tracked files affected (single-line addition to .gitignore).

Summary by Sourcery

Enhancements:

  • Ignore local .worktrees/ directories so nested Git worktree checkouts do not appear as untracked content or risk accidental inclusion.

Summary by CodeRabbit

  • Chores
    • Added ignore rules for nested Git worktree checkouts to keep them out of version control.

.worktrees/ (git worktree add target) was untracked in the root
.gitignore, so the primary checkout's git status collapsed every
worktree's full content into one opaque untracked-directory line —
a real risk for an accidental git add -A picking up nested checkouts.
Copilot AI balanced review requested due to automatic review settings September 1, 2026 11:13

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.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 5f3b3a3 Sep 01, 2026 · 11:13 11:13

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
worldscript-studio Ready Ready Preview Sep 1, 2026 11:14am UTC

@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@sourcery-ai

sourcery-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR adds the root .worktrees/ directory to .gitignore, hiding nested Git worktree checkouts from the primary checkout and reducing the risk of accidentally staging their contents.

File-Level Changes

Change Details Files
Ignore the local worktree directory at the repository root to prevent nested checkout contents from appearing as untracked files or being accidentally staged.
  • Add .worktrees/ to the root ignore rules.
  • Keep the change limited to the ignore configuration with no tracked-file modifications.
.gitignore

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 5f3b3a33
Scan Time: 2026-09-01 11:14:38 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED No IAC issues

View Full Results

@amazon-q-developer amazon-q-developer 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.

This PR correctly adds .worktrees/ to .gitignore to prevent accidental commits of nested git worktree checkouts. The change is straightforward and addresses the stated risk effectively. No issues found.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 3a22a791-1d34-4eaf-b32a-a1c1ba9565dc

📥 Commits

Reviewing files that changed from the base of the PR and between 7ce506e and 5f3b3a3.

📒 Files selected for processing (1)
  • .gitignore

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The .gitignore file now excludes nested Git worktree checkouts under .worktrees/.

Changes

Worktree configuration

Layer / File(s) Summary
Ignore nested worktrees
.gitignore
The ignore configuration documents and excludes .worktrees/.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 5f3b3

This localized .gitignore change only excludes nested .worktrees/ directories from accidental tracking. No actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: ignoring nested Git worktree checkouts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/gitignore-worktree-dirs

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

@deepsource-io

deepsource-io Bot commented Sep 1, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 7ce506e...5f3b3a3 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Docker Sep 1, 2026 11:13a.m. Review ↗
JavaScript Sep 1, 2026 11:13a.m. Review ↗
Python Sep 1, 2026 11:13a.m. Review ↗
Rust Sep 1, 2026 11:13a.m. Review ↗
Shell Sep 1, 2026 11:13a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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