Support Worktrees 🌲
A Git worktree is a linked copy of your Git repository, allowing you to have multiple branches checked out at a time. A worktree has a separate path from your main working copy, but it can be in a different state and on a different branch.
Git SCM reference link: https://git-scm.com/docs/git-worktree
As a user, I want GitKraken to support worktrees.
Comments: 23
-
15 Jun, '21
Gabriel LascanoThis would be a great addition I support it 100%.
2 -
16 Jun, '21
Elliot DerhayThis sounds nice to have to me, although I admit I probably wouldn't use it that often.
I'm curious about how it would be implemented. Would the tree indicate that there are 2 heads checked out, and consequently 2 sets of WIP changes? How would GK know which tree to use for adding commits? -
25 Jun, '21
Max MoldmannMost functionality is already there. GitKraken has learned a while ago to load worktree's as a separate repository.
GitKraken will also tell you if you are trying to checkout a branch that is already used by a linked repository.
GitKraken just does not list worktree repo's in the Project directory repo lists, you have to manually open them via the "Open repository" dialog. -
15 Jul, '21
JonathanThe way I'd want to see it is that where you would normally switch branch, that would just show you the context of that worktree (or add a dropdown next to the branch checkout for worktrees)
See image here: https://ibb.co/t3b8MBg -
26 Jul, '21
krurschakWould be great to have this Git native feature in the UI :)
-
10 Aug, '21
Alexis LucattiniThis is also needed in order to have 'sparse-configs'
-
03 Sep, '21
KevinWorktree project won't be list in "Recently Opened" or "Favorites", need manually open it every time.
When switch from other tab to worktree project tab, all previous loaded data and UI are gone, and it show a loading dialog to open repo, it's very annoying.
This bad support of worktree prevent me switching from Souretree which can treat worktree project as normal project, nearly perfect. -
21 Sep, '22
PeterWORKTREES is one the most useful features when you have to manage a team of developers and you have to help them out while they are working on different branches.
Seeing that Kraken doesn't completely support it yet - was almost a deal breaker for me -
21 Sep, '22
Joey Kelroy Admin"Support for worktrees in Project directories" (suggested by Harry Phillips on 2022-09-13), including upvotes (1) and comments (0), was merged into this suggestion.
-
31 Oct, '22
Chris Abernethy+1, Worktree support would be very useful
-
10 Jan, '23
Mike Worthington+1, GitLens already has support. Would be great if GitKraken Client also supported worktrees. It's a bit jarring when I double click on a branch and I get an error that tells me I already have it checked out.
-
13 Jan, '23
Jeremiah SneeAlso would be nice to have a open worktree in VSCode UI option. and as well as open GitKraken from GitLens in VSCode.
-
10 Mar, '23
JoelI'd love to see this. Worktrees are getting more popular. They are very useful. Sourcetree has them.
-
14 Mar, '23
IsaacBThere has historically been a complete absence of support for the not really related core.worktree setting for the main working tree to reside in a different place from the repository files in ALL git GUIs using libgit2 in any capacity. Literally, the only one that supports core.worktree to this day is GitExtensions. I would imagine whatever prevents them from supporting the simple 18 year old git feature of having your main worktree not be in the same place as the git repository folder is also an issue for the additional worktrees.
I'm excited at the prospect that GitKraken might add support for additional worktrees (as simple as creating tabbed history display for "Main" and each branch that has an additional worktree) since I make heavy use of this feature in order to compare proprietary binary files in their editor without setting up external diff and merge tools for everything. I'm also hoping that this may cause them to fix support for the core.worktree setting also. -
06 Jun, '23
SulemanThis is a really useful feature. Any timeline when this will be implemented?
-
03 Nov, '23
Declan BrownWould really appreciate this feature
-
08 Nov, '23
Ryan Craig MartinSupport to match or improve upon GitLens would be amazing.
-
17 Nov, '23
romibiI use worktrees to save harddrive space as I have multiple branches of the same big repository checked out at the same time.
4
Up until GitKraken 9.10 working with worktree checkouts worked fine even with enabled Experimental Feature "Use Git Executable".
Now I need to disable that to be able to pull (and probably more)
I assume until GitKraken 9.9.2 for pull the internal library was used even with that feature enabled, as i was unable to detect a git.exe call.
Now with GitKraken 9.10 the git.exe pull call is run with the "Current Directory" of "…\.git\worktrees\name\" instead of the opened repo folder.
Without "Use Git Executable" everything works fine.
Although a worktree UI would be nice. My main concern is beeing able to use an existing worktree. -
02 Jan
CodyConsidering this exists for GitLens already it would be REALLY great if GitKraken could also get this functionality. I rarely use VS Code but I would be content if GitLens being a plugin available for JetBrains IDEs as well. If this sort of feature isn't going to be prioritized then I'll have to start looking elsewhere (for what it's worth I happily pay for and support GitKraken today).
2 -
19 Feb
rsdevFYI for anyone not knowing that GitKraken *doesn't* support worktrees, you can't add a bare repo with worktrees to a GitKraken workspace. I spent an hour trying to do this before finding this thread and figuring out that GitKraken doesn't support worktrees.
1
Worktrees are a cool feature but presently kind of niche and it seems like it's already in GitLens so one inadequate workaround is to just use GitLens, I guess. Not a fan as a neovim/JetBrains user. The other thing you could do is not use worktrees. It seems like you'll have to choose between GitKraken and worktrees until this is implemented. -
21 Feb
Joey Kelroy Admin"Virtual branches (worktrees?) with Drag&Drop like GitButler" (suggested by <Hidden> on 2024-02-14), including upvotes (1) and comments (0), was merged into this suggestion.
-
08 Apr
Tony FischerI have been working with worktrees for years, and until the latest GitKraken it also worked in GitKraken.
2
1. I create my workstrees in a git.bash command box
2. I open the repo in GitKraken and have the wonderfull UI og GitKraken
But with version 9.13.0 I get an error "Pull Failed! fatal: this operation must be run in a worktree"
If I open a terminal and do a "git pull" the worktree is updated.
I have yet to find out what happen in case of conflict.
Please fix this. -
23 Apr
AaronThis feature is supported in GitLens+ for Visual Studio Code, so at first I was surprised it's not supported in GitKraken.
1
I learned about submodules yesterday, which prompted the thought, is worktree development incompatible with submodule development?
However much that answer may be true might influence why GitKraken hasn't provided worktree support in their GitKraken GUI.
I feel like that'd be something to happily verbalise to us, but they haven't, so I'd venture they're not interested in this feature.
They likely used VSC to prototype the compatibility of submodules and worktrees.
Worse off, this incompatibility is at the Git layer, not just at the Git GUI client layer.