Search code examples
gitbashvisual-studio-2015vs-community-edition

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.


Solution

  • 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.