Imari Childress
Imari Childress

Reputation: 85

Git Bash is unable to view all folders in Visual Studio directory

Brand newbie to coding. Using Visual Studio 2015. Using Git Bash, I navigate to my Visual Studio folder and when I list, only the Templates folder shows up - no Projects and other folders. I've tried other list options, still on the Templates folder is listed (in blue).

Oddly, when I go to the Projects folder inside Visual Studio with explorer, right click on my Projects folder and choose "Git Here", the bash window that opens shows the contents of my Projects folder. This is the only way I am able to see these folders in Git Bash. I suppose it is a work around, but why?

Could have something to do with using Parallels/Windows 7? I'm too ignorant at this point to have a good guess.

Upvotes: 1

Views: 128

Answers (2)

Imari Childress
Imari Childress

Reputation: 85

I believe the directory problem was that Parallels created a :Y drive in the directory system where the Visual Studio files were stored when I first set this up. The :Y drive allows for sharing between my mac and the Windows VM. I moved the VS files (Projects, Templates and everything) to the :C drive in the Windows VM. Now navigating through GIT makes sense and I no longer get a warning about untrusted files form VS when I open projects.

I'm not 100% clear on the why, but I think it has something to do with the difference in security permissions between the "local" C drive and the shared Y drive. The best I can say is that directory navigation works the way I expect now. ...Also, I deleted the entire Visual Studio folder from the shared Y drive so there would be no confusion when searching for my projects. And I reset the default location for Projects in Templates in Tools>Options>Projects and Solutions.

Upvotes: 1

VonC
VonC

Reputation: 1323963

when I go to the Projects folder inside Visual Studio with explorer, right click on my Projects folder and choose "Git Here", the bash window that opens shows the contents of my Projects folder

You can do a pwd to check if the path is the same as the one you were going through git bash directly.

And you can check for the environment variables like:

echo $GIT_DIR 
echo $GIT_WORK_TREE

They can influence what a git status would reflect: the repo in folder A even if you are in folder B.

Upvotes: 0

Related Questions