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?

Want more #aiagents & #tutorial deep dives?

Join 6,142+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

2 Comments

2 votes
1

More Posts

AAIF Hits 10 Projects. Its CTO on What to Adopt Now and the Security Gaps Left Open

Tom Smithverified - Oct 23

What Security Teams Want From AI Agents Before They Let Them Act Alone

Tom Smithverified - Nov 18

When One Python Process Fails, You Need to See All of Them

Tom Smithverified - Nov 23

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelski - Apr 23

Stop Turning Every REST Endpoint into an MCP Tool: A Better Approach to AI Tool Design

zeekwrites - Nov 30
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)

13 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!