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.
Under consideration Suggested by: Jonathan • Upvoted: 17 Mar • Comments: 14
This would be a great addition I support it 100%.
This 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?
Most 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.
The 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
Would be great to have this Git native feature in the UI :)
This is also needed in order to have 'sparse-configs'
Worktree 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.
WORKTREES 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
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.
+1, Worktree support would be very useful
+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.
Also would be nice to have a open worktree in VSCode UI option. and as well as open GitKraken from GitLens in VSCode.
I'd love to see this. Worktrees are getting more popular. They are very useful. Sourcetree has them.
There 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.