A Better Way to Run Git Worktrees Finally!

●2 ●7
calendar_today • schedule1 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
🔥 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 Modelski - Apr 23

Three Design-to-Code Rules Most Developers Ignore (That Will Make You a Better Engineer)

Joemetry - Sep 26

CData's New AI Gateway Puts Context at the Center — Fixes the Three Reasons Enterprise AI Stalls

Tom Smithverified - Sep 28

Git Worktrees Are Underrated

morellodev - Mar 17

Tailwind CSS for Beginners: From Zero to Your First Component

muhammadfarhan.dev - Jul 21
chevron_left
141 Points • 9 Badges
1Posts
1Comments
12+ years building software · Writing about architecture, systems, and tools I use to ship better so... Show more

Related Jobs

View all jobs →

Commenters (This Week)

4 comments
3 comments
2 comments

Contribute meaningful comments to climb the leaderboard and earn badges!