# Bug Report git worktree

1 messages from 2023-02-08 to 2023-02-08. Participants: Konstantin Hebenstreit.
Thread: https://gitlist.dev/t/59213

## Konstantin Hebenstreit, 2023-02-08 16:40

Subject: Bug Report git worktree
Message-ID: <8b445d23-245d-d6c4-b4a2-d6f3de9051a7@gmail.com>
URL: https://gitlist.dev/e/8b445d23-245d-d6c4-b4a2-d6f3de9051a7%40gmail.com

```
Dear git developer community!

I'll just do a very simple small bug report.

I tried to use the git worktree command in vscode today.
vscode version: updated
git version 2.34.1

I created a worktree inside vscode, inside the extension gitlens by 
right clicking on another brach and selecting worktree.
This was not working immideately, so I first created a new folder 
(../new_folder) where I then linked the worktree to.
This was working fine. git worktree list showed both locations with 
their respective two branches.

Then I switched to the new_folder, using 'pushd'.

Bug 1)
In the Explorer field of vscode I did still see the files as they were 
before changing directory. Even if I reloaded it.
But in the shell of vscode I saw the files as they should be (as they 
are on the branch which is tied to the new_folder).

Bug 2) more problematic
worktree overwrote my settings.json file.
file:  .vscode/settings.json (not tracked by git)
Could be because the Extension 'cSpell' overwrote it. I was adding two 
new words to its dictionary, which is saved inside the settings json.
What I am left now is a settings.json that contains only the 
cSpell.words dict with two words in it. My original settings.json is gone...

Not that much of a problem, but inconvenient, as a cannot get it back, 
since git did not track it...

Hope this helps in some way!

Best,
Konstantin


```
