Due to a tools change, I recently needed to move my worktrees around at work. I wanted to keep my old ones around in a semi-functional state until I can get everything moved over to the new ones. But I want the new ones to be in my preferred path and use my preferred naming conventions. Once I have them set up, I rarely mess with them. Since I set them up a couple years ago, I had forgotten all of the git magic related to worktrees and needed to ask my good friend google.

It turns out that git has a convenient 'git worktree move' command. It also turns out that this command completely failed to move my worktrees. I'm not sure why and didn't take the time to debug it. When things like this fail, it's typically because our environment is out-of-date and there's not much I can do to get around that.

But with a little more searching, I found a great resource that worked like a charm.

Everything is moved over and working as it should.

Previous Post Next Post