Overview

Overview

Git Worktree

Documentation for Git Worktree plugin for Jetbrains family of IDEs.

Introduction to worktrees

Git worktrees is a feature that allows developers to maintain multiple working directories within a single Git repository, enabling simultaneous work on different branches or versions without the need for separate clones. This feature enhances workflow flexibility by letting users create isolated workspaces, each with its own set of files and branches, while sharing the same underlying repository data. Worktrees facilitate concurrent development, testing, or bug fixing by providing a lightweight and efficient solution for managing multiple contexts within a single repository.

Add worktree

Worktrees can cover various use-cases and options available during creation reflect that. The process can be started from the following UI areas:

Add worktree dialog

add-worktree-dialog

View worktrees

Worktrees related to repositories in the current project can be viewed in the dedicated view Git > Worktree

worktree-view

Worktrees corresponding to current project repositories are omitted from the view. Entries have different icons denoting if they correspond to a branch or to an exact commit:

Remove worktree

In addition to normal worktree removal, there are options available to force it:

  • unclean - normal removal can fail when there are uncommited changes in a worktree
  • locked - locked worktrees must be unlocked before removal. This option allows you to ignore the unlocking step

See git-worktree docs for more information.

Locking (paid)

This is a paid feature.

Worktrees can be locked on creation and they can be locked / unlocked from Worktree view

Locked worktree it is exempt from pruning by git worktree prune

Quick switch worktrees (paid)

This is a paid feature.

Allows quickly opening other worktree as a project.

worktree-switcher

Compare with other worktree (paid)

This is a paid feature.

This feature allows comparing file or whole directory with the same path but in other worktree.

Accessing and worktree selection

Comparison is started from the context menu of editor or Project View. compare-context-menu.png

License and usage

License and usage

Plugin is developed and delivered in freemium model.

License text is available in plugin configuration > About > License tab

All features available before 500.x.y version will stay free and receive fixes and occasional updates. Features marked as paid are available upon purchasing license using Jetbrains Marketplace.

License

END USER LICENSE AGREEMENT (“EULA”)

Version 1.0, effective as of January 25, 2024

1. DEFINITIONS

Capitalised terms used herein shall have the following meaning:

  1. Developer – the author of Plugin: Łukasz Zieliński.

Privacy policy

Plugin does not collect nor send any private information. Network activity is feature-related only.