KDecker KDecker - 2 months ago 5x
Bash Question

Windows Git Bash shell cannot find commands?

I have recently been screwing around with Windows Git Bash shell to try and force its

to not be my mapped network drive
and instead something more logical and useful. To do so I tried to edit
C:\Program Files (x86)\Git\etc\profile
, upon saving my changes and restarting it seems that GitBash now cannot find most all commands.

enter image description here

What happened and how do I fix this?

I'd also like to note that I could not edit
with Notepad++ or any other text editor, each complained that the file was already opened elsewhere on the computer when trying to save the changes. To edit the file I had to use
within Git Bash. Also once I saved these inserts (
) I could not view the changes with Notepad++, the file modified date didn't even change (though oddly enough it seems that
is now
)... Also note I do not have administrator privileges on this computer.


Try this, if your $PATH does not include a reference to git.exe:

First, echo to see if it does contain a git.exe reference:

echo "$PATH"

If not, add the path using this command:

PATH="$PATH;C:\Program Files(x86)\Git\bin"

Make sure that the path correctly addresses an existing file on your system, too.