Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio doesn't work with git worktree

I have a local git repository and I use a git worktree hierarchy. So far any application I tried worked well with git worktrees, but Visual Studio complains, that the given directory is not a git repository. I can ensure the .git file inside the directory.

According to release notes and pages and blog posts this feature was added in Visual Studio 2017, but for me even in VS 2019 it fails to load. Am I missing something?

Git failed with a fatal error.
fatal: Not a git repository: C:\Users\stepehn\Desktop\foo
like image 494
Daniel Stephens Avatar asked Jan 24 '26 09:01

Daniel Stephens


1 Answers

I found the solution, the .git file was corrupt (invalid path).

like image 165
Daniel Stephens Avatar answered Jan 26 '26 00:01

Daniel Stephens



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!