I've installed Git for Windows with the "overwrite native commands" option checked. I've checked my PATH:

C:\Users\Domenic>echo %PATH%
C:\Program Files\Git\usr\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Windows\system32;C:\Windows;C:\python2;C:\python2\Scripts;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\GitExtensions\;C:\Program Files\LLVM\bin;C:\depot_tools;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Ruby21-x64\bin;C:\ProgramData\nodist\bin;C:\ruby200\bin;C:\Chocolatey\bin;C:\Program Files\kdiff3;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\Docker Toolbox;C:\Users\Domenic\AppData\Roaming\npm;C:\Users\Domenic\Dropbox\PATH

(if you don't want to scroll that much, just note that C:\Program Files\Git\usr\bin is first)

I've checked with where:

C:\Users\Domenic>where mkdir
C:\Program Files\Git\usr\bin\mkdir.exe

And when I run that directly, it works great:

C:\Users\Domenic>"C:\Program Files\Git\usr\bin\mkdir.exe" --help
Usage: /usr/bin/mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.

Mandatory arguments to long options are mandatory for short options too.
  -m, --mode=MODE   set file mode (as in chmod), not a=rwx - umask
(... etc ...)

However, when I try to run mkdir from the command line, it always goes back to Windows's built-in one:

C:\Users\Domenic>mkdir --help
A subdirectory or file --help already exists.

C:\Users\Domenic>mkdir /?
Creates a directory.

MKDIR [drive:]path
(... etc ...)

Why can't I override mkdir?

Windows 10, Git for Windows 2.7.3


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.