<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tasuku Yamashita</title>
    <description>The latest articles on DEV Community by Tasuku Yamashita (@tasuku43).</description>
    <link>https://dev.to/tasuku43</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3747667%2Ff7501754-4d81-48fd-98b9-34812201e925.jpeg</url>
      <title>DEV Community: Tasuku Yamashita</title>
      <link>https://dev.to/tasuku43</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tasuku43"/>
    <language>en</language>
    <item>
      <title>Manage Git worktrees declaratively with YAML (plan/apply + guardrails) — gion</title>
      <dc:creator>Tasuku Yamashita</dc:creator>
      <pubDate>Mon, 02 Feb 2026 14:46:44 +0000</pubDate>
      <link>https://dev.to/tasuku43/manage-git-worktrees-declaratively-with-yaml-planapply-guardrails-gion-378n</link>
      <guid>https://dev.to/tasuku43/manage-git-worktrees-declaratively-with-yaml-planapply-guardrails-gion-378n</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; I built &lt;strong&gt;gion&lt;/strong&gt;, a CLI to manage &lt;strong&gt;Git worktrees&lt;/strong&gt; declaratively.&lt;br&gt;&lt;br&gt;
Write your desired state in &lt;code&gt;gion.yaml&lt;/code&gt;, then &lt;strong&gt;plan/apply&lt;/strong&gt; to create/update/cleanup in bulk &lt;strong&gt;with guardrails&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
It also supports &lt;strong&gt;task-scoped workspaces&lt;/strong&gt; (grouping multiple repos for a &lt;strong&gt;monorepo-like workflow&lt;/strong&gt;) and fast navigation via &lt;strong&gt;giongo&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Repo / docs:&lt;br&gt;
&lt;a href="https://github.com/tasuku43/gion" rel="noopener noreferrer"&gt;https://github.com/tasuku43/gion&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Why I built this
&lt;/h2&gt;

&lt;p&gt;After I started using AI coding agents more often, I ended up doing more parallel work. That naturally led me to &lt;code&gt;git worktree&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But the more parallel tasks I had, the more I kept asking myself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where should I create the next worktree?&lt;/li&gt;
&lt;li&gt;Navigating across many worktrees is annoying.&lt;/li&gt;
&lt;li&gt;Can I delete this safely? (Or will I accidentally lose local changes?)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are already tools around worktrees, but I wanted two things in particular:&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Guardrails during cleanup&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
   I wanted to prevent “I didn’t mean to delete it, but it was deletable anyway.”&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;Task-scoped workspaces&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
   I wanted a “box per task” that can contain &lt;strong&gt;one or more worktrees&lt;/strong&gt;, possibly across &lt;strong&gt;multiple repositories&lt;/strong&gt;, so I can run my coding agent from the workspace root — and then delete the whole box when done.&lt;/p&gt;

&lt;p&gt;That’s what &lt;strong&gt;gion&lt;/strong&gt; is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdqcs7okhzr8ui9o7ln8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdqcs7okhzr8ui9o7ln8.gif" alt="Demo: gion reconciles workspaces via plan/apply (create/update/delete)" width="760" height="456"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;The core workflow is &lt;strong&gt;Create / Move / Cleanup&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create&lt;/strong&gt;: edit &lt;code&gt;gion.yaml&lt;/code&gt; manually, or use &lt;code&gt;gion manifest add&lt;/code&gt; (interactive) → &lt;code&gt;gion apply&lt;/code&gt; (Plan → confirm → Apply)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Move&lt;/strong&gt;: use &lt;code&gt;giongo&lt;/code&gt; to search and jump (no state changes)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cleanup&lt;/strong&gt;: edit &lt;code&gt;gion.yaml&lt;/code&gt; manually, or use &lt;code&gt;gion manifest gc&lt;/code&gt; (automatic) / &lt;code&gt;gion manifest rm&lt;/code&gt; (interactive) → &lt;code&gt;gion apply&lt;/code&gt; (Plan → confirm → Apply)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tip: &lt;code&gt;gion manifest&lt;/code&gt; can be shortened to &lt;code&gt;gion m&lt;/code&gt; or &lt;code&gt;gion man&lt;/code&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  How it works: &lt;code&gt;gion.yaml&lt;/code&gt; and the &lt;code&gt;manifest&lt;/code&gt; subcommands
&lt;/h2&gt;

&lt;p&gt;The center of gion is &lt;strong&gt;&lt;code&gt;gion.yaml&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;gion.yaml&lt;/code&gt; is the &lt;strong&gt;source of truth&lt;/strong&gt; (“desired state” / inventory).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gion manifest ...&lt;/code&gt; is an &lt;strong&gt;entry point&lt;/strong&gt; to update that YAML (you can also edit it directly).&lt;/li&gt;
&lt;li&gt;After any update (via command or direct editing), you run &lt;strong&gt;&lt;code&gt;gion apply&lt;/code&gt;&lt;/strong&gt; to reconcile the filesystem with the desired state.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gion apply&lt;/code&gt; computes a &lt;strong&gt;plan&lt;/strong&gt;, shows the diff, and then applies it when you confirm.&lt;/li&gt;
&lt;li&gt;By default, &lt;code&gt;gion manifest ...&lt;/code&gt; will run &lt;code&gt;gion apply&lt;/code&gt; after rewriting &lt;code&gt;gion.yaml&lt;/code&gt;. Use &lt;code&gt;--no-apply&lt;/code&gt; if you want to update &lt;code&gt;gion.yaml&lt;/code&gt; only and apply later.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Terminology: worktree vs workspace
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;Git worktree&lt;/strong&gt; is a working directory that checks out a branch (or a specific commit).&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;workspace&lt;/strong&gt; (in gion’s terms) is a &lt;strong&gt;task-scoped directory&lt;/strong&gt; that can contain &lt;strong&gt;one or more worktrees&lt;/strong&gt; — potentially from multiple repos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A typical layout looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GION_ROOT/
├─ gion.yaml           # desired state (inventory)
├─ bare/               # shared bare repo store
└─ workspaces/         # task-scoped workspaces
   ├─ PROJ-123/        # workspace_id (task)
   │  ├─ backend/      # worktree (repo: backend)
   │  ├─ frontend/
   │  └─ docs/
   └─ PROJ-456/
      └─ backend/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Create: review a plan, then create in bulk
&lt;/h2&gt;

&lt;p&gt;There are two ways to declare “create this workspace”:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;gion manifest add&lt;/code&gt;, or&lt;/li&gt;
&lt;li&gt;Edit &lt;code&gt;gion.yaml&lt;/code&gt; directly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In both cases, you’re declaring a desired state first, and then reconciling with &lt;strong&gt;&lt;code&gt;gion apply&lt;/code&gt;&lt;/strong&gt;:&lt;br&gt;
1) compute the plan&lt;br&gt;
2) show the diff&lt;br&gt;
3) apply when you confirm&lt;/p&gt;
&lt;h3&gt;
  
  
  Four creation modes
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;gion manifest add&lt;/code&gt; supports four entry paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;repo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;issue&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;review&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;preset&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The entry point differs, but the destination is the same: everything ends up in &lt;code&gt;gion.yaml&lt;/code&gt; as desired state.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqeedcq6ufp7q11726t1c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqeedcq6ufp7q11726t1c.png" alt="Screenshot: gion manifest add modes (repo/issue/review/preset)" width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;issue&lt;/code&gt; / &lt;code&gt;review&lt;/code&gt;: queue up many, then apply once
&lt;/h4&gt;

&lt;p&gt;If you use &lt;code&gt;issue&lt;/code&gt; / &lt;code&gt;review&lt;/code&gt;, you’ll need the &lt;code&gt;gh&lt;/code&gt; CLI (GitHub-only).&lt;br&gt;
These correspond to &lt;code&gt;--issue&lt;/code&gt; / &lt;code&gt;--review&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The intended flow is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;select multiple Issues / PRs&lt;/li&gt;
&lt;li&gt;add them to &lt;code&gt;gion.yaml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;gion apply&lt;/code&gt; once&lt;/li&gt;
&lt;li&gt;review the plan, then apply&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is great when you want to spin up many review/issue worktrees quickly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfe4u3a1iz9uppv1kw4u.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfe4u3a1iz9uppv1kw4u.gif" alt="Demo: select multiple Issues/PRs and create worktrees in one apply" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;repo&lt;/code&gt;: create a single workspace quickly
&lt;/h4&gt;

&lt;p&gt;If you just want the fastest “create one workspace”, &lt;code&gt;repo&lt;/code&gt; is the simplest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;choose a repo&lt;/li&gt;
&lt;li&gt;set a workspace id&lt;/li&gt;
&lt;li&gt;confirm the plan&lt;/li&gt;
&lt;li&gt;apply&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmokwx7dosfgl3rtj7im7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmokwx7dosfgl3rtj7im7.png" alt="Screenshot: repo mode (create one workspace quickly)" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;preset&lt;/code&gt;: group multiple repos under one task workspace (monorepo-like workflow)
&lt;/h4&gt;

&lt;p&gt;A workspace is a “task box”, so it’s common to want something like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;backend + frontend + docs&lt;/li&gt;
&lt;li&gt;backend + infra&lt;/li&gt;
&lt;li&gt;or any other multi-repo set&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With &lt;strong&gt;presets&lt;/strong&gt;, you define the set once, and then reuse it to create workspaces repeatedly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57acy19xsjfgt4do8179.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57acy19xsjfgt4do8179.png" alt="Screenshot: create a preset (define a reusable repo set)" width="800" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7aqcmz5e0etprx10d46m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7aqcmz5e0etprx10d46m.png" alt="Screenshot: create a workspace from a preset (multi-repo)" width="800" height="555"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Direct YAML editing
&lt;/h4&gt;

&lt;p&gt;Direct editing is useful when you want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;adjust branch names in bulk&lt;/li&gt;
&lt;li&gt;create/remove multiple workspaces at once&lt;/li&gt;
&lt;li&gt;refactor/reorganize existing definitions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After editing, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gion apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll get a plan showing &lt;strong&gt;creates / deletes / updates&lt;/strong&gt; together, so you can calmly review what will happen before applying.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpsperyjrfddicopxrbba.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpsperyjrfddicopxrbba.png" alt="Screenshot: plan shows create/delete/update changes together" width="800" height="339"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Move: search and jump to a workspace/worktree
&lt;/h2&gt;

&lt;p&gt;Once worktrees start to accumulate, you waste time thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Where was I working on that?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For navigation, use &lt;strong&gt;&lt;code&gt;giongo&lt;/code&gt;&lt;/strong&gt; (installed alongside &lt;code&gt;gion&lt;/code&gt; via Homebrew/mise).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;giongo&lt;/code&gt; does &lt;strong&gt;not&lt;/strong&gt; change any state.&lt;/li&gt;
&lt;li&gt;It lists both &lt;strong&gt;workspaces&lt;/strong&gt; and &lt;strong&gt;worktrees&lt;/strong&gt;, and lets you filter and select.&lt;/li&gt;
&lt;li&gt;Select a &lt;strong&gt;workspace&lt;/strong&gt; → jump to the workspace directory&lt;/li&gt;
&lt;li&gt;Select a &lt;strong&gt;worktree&lt;/strong&gt; → jump to that repo’s working directory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffi7w0edfr2ktvxpkvono.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffi7w0edfr2ktvxpkvono.gif" alt="Demo: giongo lists and jumps to workspaces/worktrees" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Shell integration: make &lt;code&gt;giongo&lt;/code&gt; change directories
&lt;/h3&gt;

&lt;p&gt;If you want selection → &lt;code&gt;cd&lt;/code&gt;, you need a small shell integration. The README includes options, but the simplest is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;giongo init&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(That prints a function you can paste into &lt;code&gt;~/.zshrc&lt;/code&gt; or &lt;code&gt;~/.bashrc&lt;/code&gt; for permanent setup.)&lt;/p&gt;




&lt;h2&gt;
  
  
  Cleanup: conservative &lt;code&gt;gc&lt;/code&gt;, and guarded &lt;code&gt;rm&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;As worktrees pile up, you eventually pause and ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Is it safe to delete this?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;gion splits cleanup into two commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;gion manifest gc&lt;/code&gt;: &lt;strong&gt;automatic, conservative cleanup&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gion manifest rm&lt;/code&gt;: &lt;strong&gt;manual selection with guardrails&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;gion manifest gc&lt;/code&gt;: conservative auto-cleanup
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;gion manifest gc&lt;/code&gt; proposes candidates that are &lt;strong&gt;highly likely safe&lt;/strong&gt; to delete.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;workspaces whose checked-out branches are already merged into the default branch can be reclaimed&lt;/li&gt;
&lt;li&gt;anything ambiguous (uncommitted / unpushed / unreadable state, etc.) is excluded by default&lt;/li&gt;
&lt;li&gt;even “created but no commits” workspaces are excluded so you don’t delete something by accident&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short: &lt;code&gt;gc&lt;/code&gt; aims to keep false-positives very low.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90lzkd6aubtu9p87o4z5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90lzkd6aubtu9p87o4z5.png" alt="Screenshot: gc classifies safe-to-delete candidates conservatively" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;gion manifest rm&lt;/code&gt;: manual removal, with guardrails
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;gion manifest rm&lt;/code&gt; is for cases where &lt;strong&gt;a human decides&lt;/strong&gt; what to delete.&lt;/p&gt;

&lt;p&gt;It supports interactive selection and then a final confirmation. During selection, each workspace gets lightweight tags like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;[dirty]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[unpushed]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[diverged]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[unknown]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What those mean:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;dirty&lt;/strong&gt;: working tree has uncommitted changes (including untracked files or conflicts)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;unpushed&lt;/strong&gt;: your local branch is ahead of upstream (has commits not pushed)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;diverged&lt;/strong&gt;: local and upstream have both advanced (ahead and behind)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;unknown&lt;/strong&gt;: cannot be determined (no upstream, detached HEAD, git error, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you delete something risky (e.g., &lt;code&gt;dirty&lt;/code&gt;), the &lt;strong&gt;plan&lt;/strong&gt; will show a risk summary (e.g., &lt;code&gt;risk: dirty (unstaged=2)&lt;/code&gt;) and (for dirty cases) the changed files, so you can sanity-check quickly before you confirm.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2jdlxkz8lggmv0l5kk8n.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2jdlxkz8lggmv0l5kk8n.gif" alt="Demo: rm shows risk and changed files in the plan before deletion" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Cleanup via direct YAML editing
&lt;/h3&gt;

&lt;p&gt;You can also remove workspaces by editing &lt;code&gt;gion.yaml&lt;/code&gt; directly.&lt;/p&gt;

&lt;p&gt;Even then, &lt;code&gt;gion apply&lt;/code&gt; will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;clearly show what will be removed in the plan&lt;/li&gt;
&lt;li&gt;ask for a confirmation before destructive changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So if you get nervous, you can just answer &lt;code&gt;n&lt;/code&gt; and stop.&lt;/p&gt;




&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;Installation (Homebrew / mise) and full usage examples are in the GitHub README. If you’ve ever felt the pain of worktree sprawl — especially in multi-repo tasks — I’d love for you to try &lt;strong&gt;gion&lt;/strong&gt; and share feedback.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/tasuku43/gion" rel="noopener noreferrer"&gt;https://github.com/tasuku43/gion&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>productivity</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
