-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: git worktrees #1601
Comments
Yes, support for worktrees is on the wishlist. It is important to have new commands which integrate into what we already have For example,
Does git
Very quick implementation tips:
|
I need this workflow. I'll start looking into it and work on getting to fit your guidelines. |
> git worktree list
/home/zenobius/Projects/Mine/Github/GitSavvy 7eb2ae4e [feature/1601-git-worktrees] we could at least use a pattern to get the branch name there and test if a branch is already checked out as a worktree. Then if the user tries to check it out, we just offer to open a new window with that worktree dir as the cwd. (not sure if sublime can know about other running instances of sublime and switch to an existing one?)
removing a worktree can be done two ways:
"main" worktree is not a thing. There's only :
This is more obvious when you do : git clone --bare some.repo.git ~/Projects/some-repo/.git
cd ~/Projects/some-repo
# add to .git/config
# [remote "origin"]
# fetch = +refs/heads/*:refs/remotes/origin/*
git worktree add ./main master
git worktree add ./pr-review feature/UI-7933-add-employee-to-payrun
git worktree add ./payroll-staging release/payroll-1.17.2
git worktree add ./payroll-prod release/payroll-1.10.1 Now, you see the concept of a "main" worktree is entirely up to me to define. |
@kaste Should i make a new |
Haha, sure if you do a bare clone to begin with. In all other cases the main worktree is created by
For the branches dashboard, we basically only use a Since you cannot checkout a branch already checked out in a worktree it sounds reasonable to open it in a new window; or switch to it if already open. Also it may make sense that Unfortunately, we cannot list detached worktrees with just I'm not so sure about the concrete workflows.
Typically yes, but you're also asking me to micro-manage here. The code and the commits should be reasonable and fit into what we have. |
Switching and opening known worktrees is like switching known sublime projects. It is actually not really important to reimplement this here as we already have that with Sublime Text. For example I now have T.i. just creating a worktree and then open it once enables switching and reopening for free. (The exact panel in the picture above is self-made, but Sublime comes with a project switcher, it is just harder to read.) |
Would you be open to receiving a PR for a new tab ui that allows for the management of git worktrees?
https://www.youtube.com/watch?v=2uEqYw-N8uE
At a high level I imagine it would look kinda like:
The text was updated successfully, but these errors were encountered: