A Better Way to Run Git Worktrees Finally!

2 7
calendar_todayschedule1 min read

I recently found git-gtr, a small CLI by the CodeRabbit team that wraps native Git worktrees and makes them practical for daily use.

Install it, create an alias for it alias gw="git gtr" (Easier to remember, but up to you!).

Navigate to your repository

  • gw new <branchName> will create a new worktree. The first time it will create a new folder in the parent directory -worktrees, inside it a folder for your newly created worktree.
  • gw editor <branchName> will open the configured code editor.
  • gw ai <branchName> will start your cli (claude, codex, opencode)
  • gw run <branchName> <command> will run commands on that worktree
  • gw rm <branchName> to remove it once you are done.

Full demo in my new vid. Would you use this? or do you prefer the original git command?

141 Points9 Badges2 7
1Posts
1Comments
12+ years building software · Writing about architecture, systems, and tools I use to ship better software · Java · TypeScript · Rust · ????????
Follow along!
Build your own developer journey
Track progress. Share learning. Stay consistent.

2 Comments

2 votes
1
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelskiverified - Apr 23

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelskiverified - Mar 19

The Sovereign Vault — A Comprehensive Guide to Protocol-Driven AI

Ken W. Algerverified - Jun 4

AI Agents Don't Have Identities. That's Everyone's Problem.

Tom Smithverified - Mar 13

Git Worktrees Are Underrated

morellodev - Mar 17
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

7 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!