git-bash $PATH cannot parse windows directory with space git-bash $PATH cannot parse windows directory with space windows windows

git-bash $PATH cannot parse windows directory with space


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"


Put a backslash ("\") before the space.

ex. cd My\ Documents


I am having similar problem.
After some struggle, i put this on the first line in my C:\Program Files\Git\etc\profile:

export HOME=`cygpath -u "\`cygpath -d "$HOMEDRIVE$HOMEPATH"\`"`

and type command echo $HOME in bash will come out /c/Users/NAMEXX~1, no more space parsing problem for my $HOME or ~/ !