git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bug Report git worktree

From
KHKonstantin Hebenstreit <konstantin.hebenstreit@gmail.com>
Date
Feb 8, 2023, 16:40 UTC
Message-ID
<8b445d23-245d-d6c4-b4a2-d6f3de9051a7@gmail.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

Message 1 of 1 in “Bug Report git worktree”
  1. Konstantin HebenstreitFeb 8, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.