One Tip a Week: Git Worktrees

This week’s tip of the week is a git worktree. Ever find yourself stashing changes just to switch branches? Guilty as charged.

I came a cross a short explainer from Bash Bunni about worktrees. I literally started using them the next day after watching her video. Instant game changer for me in my dev workflow.

There’s really only the these three commands you need to know:

  1. Create a new worktree

git worktree add ../my-bugfix
  1. List worktrees

git worktree list
  1. Remove a worktree

git worktree remove ../my-bugfix

For VS Code or Cursor users, there’s a handy Git Worktree extension that makes it super easy to manage worktrees. I’m so glad I came across Bashbunni’s video. Give her channel a subscribe if you haven’t already!

That’s it! Short and sweet. Until the next one!