Git and Git on VSCode: samba shared folder issue
Asked Answered
C

1

7

I have a shared folder on ubuntu server 16.04. VSCode Insiders works fine with local folders but on samba shared folders git integration fails ignoring the existing .git folder as you can see in the image below. The share folder has the correct setup with full read/write and it is not hidding the unix dot folders/files. I tried changing different combinations of unix folder access permissions without success. Tried to map the shared folder to a drive letter on windows, no success.

Just in case it could be related: The samba server only accepts connections when clients are using server's ip address like \\192.168.1.100\shared-folder (trying to access with server hostname like \\server-name\shared-folder, fails)

Any recomendation will be appreciated.

Git on VSCode just ignoring .git folder

I try using git bash and now I see it is a git related problem:

enter image description here

tl;dr

The samba server is a virtual machine on my windows 10 pc as host. I'm using this to develop and test several kind of web apps. The shared folder is used only for access the source code and made changes with a modern code editor. Git is installed on my windows pc and git bash is enable on VSCode terminal. VSCode terminal 'git status' command fails too listing all project files as untracked.

Chantress answered 2/8, 2017 at 11:27 Comment(2)
If you have git setup then I suggest working on a local clone/checkout instead of the share. This would be more comfortable and spare you some troubles with SambaAestival
Thank you @HeroicKatora. I think it is the best solution for now but implementing it in my environment is not so easy. I tried many alternatives without success. I'll try your solution anyway.Chantress
U
3

I have a similar setup and had the same problem. I issued the following commands in VSCode Terminal (on the Windows machine):

git config core.autocrlf true
git config core.filemode false

Fixed the problem for me.

Ut answered 5/1, 2020 at 5:57 Comment(1)
Adding git config core.filemode false on the windows machine also fixed my issue. Thanks!Widely

© 2022 - 2024 — McMap. All rights reserved.