git-bash $PATH cannot parse windows directory with space

wyonghao picture wyonghao · Jul 3, 2014 · Viewed 50.5k times · Source

I would like to use git-bash come with github client on a windows 7 (32bit) machine. Somehow, the git-bash has already learned the $PATH variables from windows system PATH. However, I found the $PATH in git-bash did not parse the win system PATH with space correctly.

for example the $PATH outputs:

"..../c/Program: No such file or directory"

Is there anyway to fix it? where is the git-bash script to construct the $PATH for git shell? Thanks

Answer

Chris Hermut picture Chris Hermut · Aug 19, 2014

Why not using absolute path instead of relative path and if a folder of file name contains a space just use "" (quotes).

Ex. cd C:/Users/"My Folder"