Git: Support git worktrees in workspace
See original GitHub issue$ mkdir repro
$ cd repro
$ mkdir example1
$ cd example1
$ git init; echo "hello" > world.txt; git add world.txt; git commit -m "init";
$ git worktree add ../example1branchA
$ git worktree add ../example1branchB
$ cd ..
$ mkdir example2
$ cd example2
$ git init; echo "hello" > world.txt; git add world.txt; git commit -m "init";
$ cd ..
Scenario:
- Open
repro
directory in VS Code - Go to Git tab.
Expected: “Source Control Providers” lists Git repos.
example1
example1branchA
example1branchB
example2
Actual: “Source Control Providers” lists Git repos.
example1
example2
I sometimes will have lots of branches checked out in parallel on huge repos that I can’t afford to clone multiple times. I would also like to be able to use VS Code’s source control functionality with these checkouts all the same.
Thanks! and thanks for Code!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:51
- Comments:17
Top Results From Across the Web
git-worktree Documentation - Git
A git repository can support multiple working trees, allowing you to check out more than one branch at a time. With git worktree...
Read more >Experiment on your code freely with Git worktree
A Git worktree is a linked copy of your Git repository, allowing you to have multiple branches checked out at a time. A...
Read more >Git Worktrees in Use - Medium
Let's learn how to use Git worktrees! Cloning Your Repo. Let's start by cloning the repository to your machine. $ git clone —...
Read more >Use git worktree add and never switch branches again
Git Worktree Add Example I was today years old when I learned you could have multiple git working trees active at the same...
Read more >Tech Tuesday - Git Worktrees - YouTube
Manage multiple working trees attached to the same repository.A git repository can support multiple working trees, allowing you to check out ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you honorable vscodebot, but this feature request is not a duplicate of that issue.
What’s missing here is the ability to switch between branches and/or create a new worktree when working in a bare repo. The branch listing works just fine but vscode doesn’t automatically change the working directories when I select a branch that exists as a worktree.