User Guide

From installation to mastery, a comprehensive guide to Git Worktree Manager

1 Installation & Setup

Download & Install (Recommended)

Head to the GitHub Releases page and download the installer for your platform:

✅ macOS (Intel + ARM) ✅ Windows ✅ Linux

🔄 Built-in auto-update: once installed, new versions are pushed automatically -- no manual downloads needed.

macOS Installation Notes

  1. 1 Download the .dmg file, open it, and drag the app into the Applications folder.
  2. 2 If you see "cannot verify the developer" on first launch, right-click the app and select "Open".
  3. 3 If it still won't open, go to System Settings → Privacy & Security, find the prompt at the bottom, and click "Open Anyway".
  4. 4 If none of the above works, open Terminal and run: xattr -cr "/Applications/Worktree Manager.app"
🛠️ Build from Source (For Developers)

Prerequisites

Build Steps

# 1. Clone the project
git clone https://github.com/guoyongchang/worktree-manager.git
cd worktree-manager

# 2. Install dependencies
npm install

# 3. Run in development mode
npm run tauri dev

# 4. Build for production (optional)
npm run tauri build

💡 Tip: The first run may take a few minutes to download Rust dependencies. Please be patient.

2 Getting Started

1 Create a Workspace

After launching the app, you'll need to create or import a workspace on first use:

  • New Workspace: Select an empty directory and the app will initialize it automatically
  • Import Existing Project: Select a directory containing Git projects

2 Add a Project

Add Git projects to your workspace using any of these three methods:

Method Format Example
GitHub Shorthand owner/repo facebook/react
SSH git@host:owner/repo.git git@github.com:facebook/react.git
HTTPS https://host/owner/repo.git https://github.com/facebook/react.git

3 Create a Worktree

Click the + button in the sidebar and follow the wizard:

  1. Enter a branch name (e.g. feature/login)
  2. Choose which branch to base it on (defaults to main)
  3. Select the projects to include
  4. Configure folders to link (e.g. node_modules)
  5. Click "Create" and wait for it to finish

4 Start Developing

From the Worktree list:

  • Click Open IDE: opens in VS Code / Cursor / IDEA
  • Click Terminal: run commands in the built-in terminal
  • Click the folder icon: open in your file manager

3 Workspace Management

Directory Structure

workspace/
├── .worktree-manager.json    # Workspace configuration
├── projects/                 # Main repository directory
│   ├── frontend/             # Git project (main branch)
│   └── backend/
├── worktrees/                # Worktree directory
│   ├── feature-login/
│   │   ├── projects/
│   │   │   ├── frontend/     # Independent branch working directory
│   │   │   └── backend/
│   │   ├── .claude → ../../.claude    # Symlink
│   │   └── CLAUDE.md → ../../CLAUDE.md
│   └── hotfix-bug/
│       └── ...
├── .claude/                  # Globally shared files
└── CLAUDE.md

Global File Sharing

Set linked_workspace_items in the workspace config to automatically symlink these files/folders to all Worktrees:

{
  "linked_workspace_items": [
    ".claude",
    "CLAUDE.md",
    "requirement-docs"
  ]
}

Ideal for AI development configs, requirement docs, and other resources shared across branches.

4 Worktree Operations

🔄 Switch Branches

Click a different Worktree in the list to switch -- no git checkout needed

📊 Status Monitoring

Real-time display of commit count, uncommitted changes, and test branch merge status

🗑️ Archive Worktree

Archive when done -- checks for uncommitted/unpushed code first to prevent data loss

♻️ Restore Archive

One-click restore of previously archived Worktrees from the archive list

5 Multi-Window & Workspace Switching

Multi-Window Workflow

Each Workspace can be opened in its own independent window, letting you work on multiple workspaces simultaneously without interference.

  • In the sidebar Workspace list, click the external link icon (↗️) next to a Workspace name to open it in a new window
  • Each window runs independently -- you can view and operate different Workspaces at the same time
  • When the main window closes, child windows close as well

Window Title

The window title dynamically shows the current workspace and branch info in this format:

{WorkspaceName} - {WorktreeName}

This makes it easy to tell windows apart when working with multiple workspaces.

Worktree Locking

When a Worktree is already open in one window, it shows as "occupied" in other windows.

  • An occupied Worktree cannot be operated on from another window, preventing conflicts
  • Switching to a different Worktree automatically releases the lock on the current one
  • Closing a window automatically releases all locks held by that window

6 Terminal

Built-in Terminal

Each Worktree has its own built-in terminal with the working directory automatically set to the Worktree root. No need to cd manually.

  • The terminal panel is at the bottom of the app and can be resized by dragging
  • Switching Worktrees automatically switches to the corresponding terminal session
  • Terminal sessions persist throughout the Worktree lifecycle and won't be lost when switching

Multiple Tabs

Each Worktree can have multiple terminal tabs:

  • Click the + button in the terminal panel to create a new tab
  • Click a tab to switch between terminal sessions
  • Click the x button on a tab to close that terminal
  • Each tab runs as an independent terminal process

Fullscreen Mode

The terminal supports fullscreen mode for when you need more space:

  • Click the maximize icon in the top-right corner of the terminal panel to enter fullscreen
  • Press Escape to exit fullscreen mode
  • In fullscreen mode, the terminal fills the entire application window

External Terminal

If you prefer your system's native terminal, click the "Open in External Terminal" button in the terminal panel. It will open your default terminal app and navigate to the Worktree directory automatically.

7 Voice Input

Overview

Voice input is powered by Alibaba Cloud Dashscope Paraformer real-time speech recognition. Speak into your microphone and your speech is transcribed in real time and injected into the current terminal. Great for hands-free scenarios or quick command entry.

Two operation modes are supported:

  • Push-to-Talk: Hold Alt+V to speak, release to stop recording and transcribe
  • Click to Toggle: Click the microphone icon in the terminal panel to enter standby mode, then hold Alt+V to speak

Configuring Dashscope

Before using voice input, you need to configure a Dashscope API Key:

  1. Open the Settings page (gear icon)
  2. Scroll to the "Speech Recognition (Dashscope)" section
  3. Go to the Dashscope Console to get your API Key
  4. Paste the API Key into the input field and click "Save"
  5. Click the "Test Connection" button to verify the configuration

Dashscope Paraformer supports mixed Chinese-English recognition with fast speed and high accuracy. Works on all desktop platforms (macOS / Windows / Linux).

Microphone Settings

In the Speech Recognition section of Settings, you can manage microphone devices:

  • Select Microphone: A dropdown lists all available audio input devices. You can choose a specific microphone (e.g. external mic, headset mic). Defaults to the system default device
  • Microphone Test: Click the "Test" button to see a real-time volume meter. Speak into the mic to confirm it's working. The test stops automatically after 10 seconds
  • Connection Test: Click "Test Connection" to verify the API Key and WebSocket address are configured correctly. A green "Connection Successful" message appears on success

💡 Tip: The system will prompt for microphone permission on first use -- click "Allow". If you accidentally denied it, macOS users can go to System Settings → Privacy & Security → Microphone to enable it manually.

Usage Flow

  1. Click the microphone icon in the top-right of the terminal panel to enter standby mode (icon turns blue, microphone is active)
  2. Hold Alt+V to start speaking -- connects to Dashscope and streams audio in real time
  3. Release Alt+V to stop recording -- the transcription is automatically typed into the terminal
  4. You can press and release repeatedly for multiple voice inputs while the mic stays in standby
  5. Click the microphone icon again to exit standby mode and release the microphone
# State flow
Idle [Click mic] Standby [Hold Alt+V] Recording [Release] Standby

Voice Commands

In addition to regular text transcription, the following voice command keywords trigger terminal actions when spoken:

Voice Keyword Terminal Action
submit / enter Press Enter
backspace / delete Delete previous character (Backspace)
clear Interrupt current input (Ctrl+C)
escape Send ESC key

Example: Hold Alt+V and say git status, release, then hold again and say enter -- this types git status in the terminal and presses Enter to execute.

AI Voice Refinement

Voice transcriptions often contain filler words ("um", "uh", "like", "you know") and grammatical errors. The AI Voice Refinement feature integrates the Qwen large language model to automatically polish transcribed text:

  • Remove Filler Words: Automatically detects and removes meaningless words like "um", "uh", "like", etc.
  • Grammar Correction: Converts colloquial expressions into proper command format
  • Preserve Intent: The refinement process keeps the original meaning intact without changing command semantics
# Voice refinement example
Raw transcription: um so like git status just to check
Refined result: git status

💡 Configuration: In the Speech Recognition section of Settings, configure a Qwen API Key (via the Dashscope platform) to enable AI refinement. The refinement feature can be toggled on/off independently.

Mobile Voice Input

In browser remote mode (accessing from phone/tablet), the terminal panel provides a dedicated push-to-talk button:

  • Long-press to Talk: Long-press the microphone button at the bottom of the terminal to start recording, release to stop
  • Touch Optimized: Button size and interactions are optimized for touchscreens -- operable with one hand
  • AI Refinement Included: Mobile voice input also goes through AI refinement processing

8 IDE Integration

Supported IDEs

Worktree Manager supports a variety of popular IDEs and editors:

VS Code code
Cursor cursor
IntelliJ IDEA idea
Zed zed
Sublime Text subl
Windsurf windsurf

Switch Default IDE

In the Worktree detail view, click the dropdown arrow next to the IDE button to see the IDE selection list:

  • Selecting an IDE makes it the default for the current project
  • Next time you click the IDE button, it will open with the last selected IDE
  • Different projects can have different default IDEs

Quick Open

In the IDE dropdown menu, each IDE option has a quick-open icon (↗️) on the right:

  • Clicking the icon opens the project with that IDE without changing the default IDE setting
  • Handy for occasionally opening with a different IDE

Open in File Manager

At the bottom of the IDE dropdown menu, there's an "Open in File Manager" option that opens the Worktree's project directory in your system file manager (Finder / File Explorer).

9 Smart Folder Scan

Overview

Smart Folder Scan automatically detects large folders in your project that are good candidates for linking, helping you quickly configure linked_folders.

Once linked, newly created Worktrees will automatically symlink these folders from the main repository -- no need to reinstall dependencies or rebuild, saving significant disk space and time.

How to Use

  1. Go to the Workspace Settings page
  2. Find the Linked Folders configuration for your project
  3. Click the scan button (magnifying glass icon)
  4. The system will automatically scan the project directory and list all linkable folders
  5. Check the folders you want to link and confirm

Auto-Detected Folder Types

The scan automatically identifies these common large folders:

Folder Purpose
node_modules Node.js dependencies
.next Next.js build artifacts
dist General build output
build Build output
vendor PHP / Go dependencies
.output Nuxt 3 build output
.nuxt Nuxt.js build artifacts
target Rust / Java build output

10 Remote Sharing & Collaboration

Overview

Remote sharing lets you share your current workspace via browser with colleagues. They don't need to install anything -- just open the link to view your Worktrees, use the terminal, and even collaborate on development.

Use Cases:

  • Pair programming -- remote colleagues join your terminal via browser for real-time collaboration
  • Code demos -- let PMs or QA view your branch status in the browser
  • Remote assistance -- help colleagues troubleshoot by operating directly in their shared terminal
  • Mobile access -- check workspace status from a tablet or phone browser on the go

Sharing supports three modes: LAN direct connection (same Wi-Fi / intranet), WMS built-in tunnel (no extra tools needed), and ngrok tunneling (using the ngrok service).

Enable Sharing

In the desktop app, follow these steps to enable sharing:

  1. Find the "Share" button at the bottom of the sidebar and click to open the sharing panel
  2. Set the port number (recommended range: 49152-65535, also supports dev ports 3000-9999)
  3. Set an access password (required, protects your workspace)
  4. Click "Start Sharing" -- the system will start a built-in HTTP server
  5. Once sharing is active, a LAN access URL will be displayed (e.g. http://192.168.1.100:49152)
# Example URL after sharing is enabled
LAN Address: http://192.168.1.100:49152
# Share this address and password with your colleague

Browser Mode Access

When a collaborator opens the shared link:

  1. The browser shows a password entry page -- enter the password you set to gain access
  2. Once inside, they see the same interface as the desktop app, including the Worktree list and branch status
  3. They can use the built-in terminal (streamed in real time via WebSocket)
  4. They can join collaboration and share terminal sessions with the desktop user
  5. All operations sync in real time via WebSocket with minimal latency

⚠️ Note: Terminal operations from the browser directly affect files on your machine. Only share with people you trust.

ngrok Internet Tunneling

If your collaborator isn't on the same LAN, you can use ngrok for internet tunneling to access via a public URL:

Step 1: Install ngrok and Get a Token

  1. Go to ngrok.com and create a free account
  2. Copy your Authtoken from the ngrok Dashboard

Step 2: Configure the Token in the App

  1. Open the Settings page (gear icon)
  2. Scroll to the bottom and find the "Internet Sharing (ngrok)" section
  3. Paste the Authtoken into the input field and click "Save"

Step 3: Enable the Internet Tunnel

  1. First enable LAN sharing as described above
  2. In the sharing panel, click the "Enable Internet" button
  3. Wait for the ngrok tunnel to establish (usually takes a few seconds)
  4. The generated public URL (e.g. https://xxxx.ngrok-free.app) can be shared with anyone
# ngrok public URL example
Public URL: https://a1b2c3d4.ngrok-free.app
# Anyone with internet access can reach this URL

WMS Built-in Tunnel

In addition to ngrok, Worktree Manager includes a built-in WMS tunnel service that enables public access without installing any extra tools:

  1. First enable LAN sharing as described above
  2. In the sharing panel, click the "WMS Tunnel" button
  3. The system will automatically connect to tunnel.kirov-opensource.com and assign a unique subdomain
  4. The generated public URL (e.g. https://your-name.tunnel.kirov-opensource.com) can be shared with anyone

Advantages: No third-party account registration needed, no extra software to install. Supports automatic reconnection on disconnect with a retry countdown display.

QR Code Sharing

Once sharing is enabled, the sharing panel automatically generates a QR code for the current share URL:

  • Scan to Access: Scan the QR code with your phone/tablet to open the workspace directly in a mobile browser
  • Embedded Password: The QR code link can embed the access password (via URL fragment), so scanning auto-authenticates without manual password entry
  • All Modes Supported: LAN, WMS tunnel, and ngrok modes all support QR code generation

Client Management

The sharing panel lets you view and manage all connected clients in real time:

  • Connection List: Shows all connected browser clients with IP address, connection time, and other details
  • Kick Session: You can kick individual client sessions -- kicked users must re-enter the password to reconnect
  • Password Update: Changing the password automatically kicks all connected clients

Security Considerations

Password Protection

All shares require a password. Browser clients must authenticate before accessing any API

Brute-Force Protection

Built-in rate limiting: max 5 authentication attempts per IP per 60 seconds

Session Isolation

Each browser client gets a unique server-generated session ID that cannot be forged

CORS Restrictions

Only allows cross-origin requests from localhost, LAN IPs, and the current ngrok URL

Full Control

The sharer can change the password at any time (auto-kicks all connected users), close the internet tunnel, or stop sharing entirely

⚠️ Important: Sharing exposes your workspace files and terminal. Use a strong password and only share with people you trust. Be extra cautious with ngrok internet mode, as anyone with the link and password can access your workspace. Always disable sharing when not in use.

Sharing Troubleshooting

Colleague can't access LAN share?
  • Confirm both parties are on the same LAN / Wi-Fi
  • Check if the firewall allows the port (macOS may show a firewall prompt -- click "Allow")
  • Try testing connectivity with curl http://your-ip:port/api/get_share_info
  • If using a corporate VPN, network isolation may be the issue -- try ngrok internet mode instead
ngrok tunnel fails to start?
  • Check if the ngrok token is configured correctly (bottom of Settings page)
  • Confirm your network can reach the internet (ngrok needs to connect to its servers)
  • Free ngrok has a simultaneous tunnel limit -- make sure no other tunnels are running
  • If it times out, try again -- ngrok can occasionally be slow to connect
Browser terminal not responding?
  • Check WebSocket connection status (Browser DevTools → Network → WS)
  • If using ngrok, confirm the ngrok tunnel is still running
  • Try refreshing the page to reconnect
Port is already in use?

Simply switch to a different port number. Ports in the 49152-65535 range are recommended -- these are dynamic/private ports unlikely to be used by other programs.

# Check port usage (macOS/Linux)
lsof -i :49152

11 Configuration

Global Configuration

Location: ~/.config/worktree-manager/global.json

{
  "workspaces": [
    { "name": "My Project", "path": "/path/to/workspace" }
  ],
  "current_workspace": "/path/to/workspace",
  "ngrok_token": "2abc...xyz",
  "last_share_port": 49152
}

ngrok_token: Optional. ngrok Authtoken for internet tunneling

last_share_port: Optional. Last used sharing port, auto-filled next time

Workspace Configuration

Location: {workspace}/.worktree-manager.json

{
  "name": "My Project",
  "worktrees_dir": "worktrees",
  "linked_workspace_items": [".claude", "CLAUDE.md"],
  "projects": [
    {
      "name": "frontend",
      "base_branch": "main",
      "test_branch": "test",
      "merge_strategy": "merge",
      "linked_folders": ["node_modules", ".next"]
    }
  ]
}

worktrees_dir: Directory where Worktrees are stored

linked_workspace_items: Globally shared files

linked_folders: Project-level folder linking

merge_strategy: Merge strategy (merge or rebase)

12 Keyboard Shortcuts

Shortcut Action Context
Escape Exit terminal fullscreen Terminal fullscreen mode
Escape Close dropdown menu / dialog Any menu or dialog open
Alt+V (hold) Push-to-talk, release to stop Microphone in standby mode
Right-click Open Worktree context menu On a Worktree list item

13 Best Practices

✅ Recommended

  • • Create a separate Worktree for each feature or task
  • • Use consistent branch naming conventions (e.g. feature/xxx, hotfix/xxx)
  • • Regularly archive merged Worktrees to keep the list clean
  • • Add frequently used dependency directories to linked_folders
  • • Use the built-in terminal to avoid path confusion

⚠️ Avoid

  • • Don't manually delete Worktree directories -- use the archive feature instead
  • • Don't modify the same file in multiple Worktrees simultaneously (linked files excepted)
  • • Don't link files that may cause conflicts (e.g. .env)
  • • Avoid creating too many Worktrees (10 or fewer recommended)

14 Troubleshooting

Q: macOS says the app is "damaged" or "cannot verify the developer"?

This happens because the app isn't notarized by Apple, so macOS security blocks it. Follow these steps:

  1. Right-click the app icon and select "Open" (don't double-click)
  2. If it still won't open, go to System Settings → Privacy & Security, find the blocked app prompt at the bottom, and click "Open Anyway"
  3. If none of the above works, open Terminal and run:
xattr -cr "/Applications/Worktree Manager.app"

Then reopen the app. This command removes the quarantine attribute from the file.

Q: Worktree creation failed?

Possible causes:

  • Branch name already exists
  • Git repository has uncommitted changes
  • Insufficient disk space

Solution: Check the error message, ensure the main repository is in a clean state, or manually run git worktree add to see the detailed error.

Q: Symlinks broken / files not found?

Check that the linked_folders configuration is correct and that the corresponding folders exist in the main repository. Run in terminal:

ls -la worktrees/your-worktree/

Check if the links are intact. If broken, you can delete and recreate the Worktree.

Q: How to open a workspace in a new window?

In the sidebar Workspace list, hover over a Workspace name and an external link icon (↗️) will appear on the right.

Click the icon to open that workspace in a new window. The new window is independent and won't affect the main window.

Q: How to make the terminal fullscreen?

Click the maximize icon in the top-right corner of the terminal panel to enter fullscreen mode.

Press Escape to exit fullscreen and return to the normal layout.

Q: Which folders should I link?

Here are commonly recommended folders to link, by project type:

  • node_modules -- Node.js / frontend project dependencies
  • .next -- Next.js build cache
  • dist -- General build output directory
  • build -- React / other framework build output
  • vendor -- PHP Composer / Go dependencies
  • .output -- Nuxt 3 build output
  • .nuxt -- Nuxt.js build cache
  • target -- Rust Cargo / Java Maven build output

💡 Tip: You can also use the Smart Folder Scan feature for automatic detection. See Section 9.

Q: How to sync workspaces across multiple computers?

The workspace configuration is stored in .worktree-manager.json and can be added to version control:

git add .worktree-manager.json
git commit -m "Add worktree config"
git push

After pulling on another computer, the workspace will automatically recognize the configuration.

Q: Can archived Worktrees be restored?

Yes! Find the Worktree in the archive list and click "Restore". Note that the branch state may differ from when it was archived (if the remote has been updated).

Q: Which operating systems are supported?

Currently supported:

  • ✅ macOS (Intel + Apple Silicon)
  • ✅ Linux (Ubuntu, Debian, Arch, etc.)
  • ⚠️ Windows (experimental support, symlinks require administrator privileges)

Still Have Questions?

Feel free to open an Issue or join the discussion on GitHub