Skip to Content
Managing Git WorktreesMove a Worktree

Move a Git Worktree

Relocate a linked worktree directory to a new path on your filesystem while preserving uncommitted changes, branch references, and Git pointer files.


Why Move Through WorktreeWise?

Linked worktrees maintain a reciprocal bidirectional link with the primary Git repository:

  1. The .git file inside the linked worktree directory points back to .git/worktrees/<name> in the main repository.
  2. The gitdir file inside .git/worktrees/<name> points forward to the linked worktree’s filesystem directory.

If you move a worktree folder using your operating system file explorer or shell commands like mv or Move-Item, this bidirectional link breaks immediately. Git marks the worktree as missing and prevents its checked-out branch from being accessed elsewhere.

WorktreeWise executes git worktree move, which moves the directory on disk and atomically updates Git’s internal pointer files.


How to Move a Worktree

Open the Change Folder Dialog

In the Worktrees panel, locate the worktree you want to relocate. Select the three-dot Actions menu and choose Change Folder.

Select New Destination

In the dialog, review the current path. Select the folder icon to browse for a new parent directory, or enter the target path directly.

Move Worktree dialog

Confirm and Relocate

WorktreeWise validates that the destination directory does not already exist and resides on a compatible filesystem. Select Move to complete the relocation.


What Happens to Your Work

  • Uncommitted Modifications Preserved: Modified, staged, and untracked files transfer intact to the new directory.
  • Git Branch Unchanged: The underlying branch name, upstream tracking, and commit history remain untouched.
  • IDE and Terminal Configurations: Embedded terminal sessions and external editor targets update to the new path automatically.

The primary repository worktree and any worktrees currently locked cannot be moved. Unlock a worktree first before moving it.