docs: document how to remove all merged worktrees#76
docs: document how to remove all merged worktrees#76helizaga merged 3 commits intocoderabbitai:mainfrom
Conversation
|
Warning Rate limit exceeded@scarf005 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 47 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughAdds README documentation for a new Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @README.md:
- Around line 109-111: Add a new subsection "### git gtr clean [options]" in the
Commands section before "Other Commands" that documents the git gtr clean
command and the --merged flag; explain that --merged removes worktrees whose PRs
are merged by invoking the GitHub CLI (gh), list usage examples (git gtr clean,
git gtr clean --merged, git gtr clean --merged --dry-run), and note the
requirement that gh CLI must be installed and authenticated for --merged mode to
work.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
README.md
🧰 Additional context used
📓 Path-based instructions (1)
README.md
📄 CodeRabbit inference engine (CLAUDE.md)
README.md: Update README.md with installation/setup instructions when adding a new editor adapter
Update README.md with installation instructions and use cases when adding a new AI tool adapter
Files:
README.md
🔇 Additional comments (1)
README.md (1)
109-111: Clarify the relationship betweengit gtr clean --mergedandgit gtr rm.The PR objectives reference issue #75, which mentions
git gtr rm --mergedas the desired feature. However, the documentation added here usesgit gtr clean --mergedinstead. Please clarify:
- Is
git gtr clean --mergedthe final design decision, and if so, why wascleanchosen overrm?- Are both commands equivalent, or do they serve different purposes?
- Should the issue #75 be updated to reflect the
cleancommand instead ofrm?
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
264-281: Clarify "stale" worktrees and the behavior ofgit gtr cleanwithout--merged.The documentation uses "stale worktrees" without defining the term. Additionally, the first example (
git gtr clean) says it will "Remove empty directories and prune," but this is vague. Consider clarifying:
- What qualifies as "stale"? (Empty directories only? Worktrees with deleted branches?)
- How does the basic command differ from
--merged?- When
--mergedis used, does the command delete both the worktree and the branch?The
--mergedoption is well-documented, but the non-merged case needs better explanation for users who want to clean without GitHub integration.💡 Suggested improvements
Consider refining the command description and examples like:
- Remove stale worktrees or worktrees with merged PRs. + Remove worktrees: clean up empty directories, or remove those with merged GitHub PRs. - ```bash - git gtr clean # Remove empty directories and prune - git gtr clean --merged # Remove worktrees with merged PRs - git gtr clean --merged --dry-run # Preview what would be removed - git gtr clean --merged --yes # Non-interactive mode - ``` + ```bash + git gtr clean # Remove empty worktree directories and prune + git gtr clean --merged # Remove worktrees for merged PRs (GitHub CLI required) + git gtr clean --merged --dry-run # Preview which worktrees would be removed + git gtr clean --merged --yes # Remove without confirmation prompts + ``` - - `--merged`: Remove worktrees whose PRs are merged on GitHub + - `--merged`: Remove worktrees whose branches have merged PRs on GitHub (also deletes the branch)
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
README.md
🧰 Additional context used
📓 Path-based instructions (1)
README.md
📄 CodeRabbit inference engine (CLAUDE.md)
README.md: Update README.md with installation/setup instructions when adding a new editor adapter
Update README.md with installation instructions and use cases when adding a new AI tool adapter
Files:
README.md
🔇 Additional comments (1)
README.md (1)
109-111: Good introduction of the command in Quick Start.The new example clearly introduces the
--mergedoption alongside existing workflows. The placement and progression are effective.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @README.md:
- Line 281: Clarify the merge criteria for the --merged option by updating the
README note to explicitly state which PRs are considered "merged" (for example,
PRs merged into the repository default branch like main) and whether
closed-but-unmerged PRs are excluded; mention that the check uses the GitHub CLI
(gh) to inspect PR merge state and give a short example sentence such as "e.g.,
PRs merged into the default branch (main)".
- Line 269: The description for the command `git gtr clean` is ambiguous; update
the README entry so it explicitly states the default behavior: that `git gtr
clean` runs `git worktree prune` to remove stale worktree records and then
deletes filesystem directories that are empty and no longer associated with any
worktree, but does not delete branches or merged worktrees unless invoked with
the `--merged` option. Mention `git gtr clean` and `--merged` by name so readers
know what happens by default and what changes when `--merged` is used.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
README.md
🧰 Additional context used
📓 Path-based instructions (1)
README.md
📄 CodeRabbit inference engine (CLAUDE.md)
README.md: Update README.md with installation/setup instructions when adding a new editor adapter
Update README.md with installation instructions and use cases when adding a new AI tool adapter
Files:
README.md
🔇 Additional comments (1)
README.md (1)
264-282: Documentation forgit gtr cleancommand looks good overall.The command documentation is well-structured, follows the established pattern for other commands, includes practical examples covering different option combinations, and appropriately documents the GitHub CLI authentication requirement. The placement in the Commands section is logical and the options are clearly described.
- Clarify default behavior: git gtr clean runs 'git worktree prune' and removes empty directories - Specify that --merged removes worktrees for branches with merged PRs and deletes branches locally - Add explicit example: PRs merged into default branch (main) - Mention that GitHub CLI (gh) inspects merge state - Improve comment clarity in examples
Fixes #75
git gtr cleanis a popular command but docs was a bit lackingSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.