A Better Way to Run Git Worktrees Finally!

posted 1 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?

2 Comments

2 votes
1

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

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

Tom Smithverified - Mar 13

Git Worktrees Are Underrated

morellodev - Mar 17

Git Basics: A Beginner's Guide to Naming Conventions

Michael Larocca - Nov 3, 2025
chevron_left

Related Jobs

Commenters (This Week)

1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!