Assuming I have git installed, does it make git a command in Windows cmd environment? Why is it not in the output list when I run help? And same question for ping command. Thank you

  • 1
    git isn't native windows's program. If you want it would be accessible from console everywhere you need to set in environment variable PATH to location where you installed git program. Here is info, how to set it up: howtogeek.com/51807/… – Alex Aug 15 '18 at 20:21

As long as %PATH% lists a directory which contains git.exe (or git.bat, git.cmd, git.com…), it will be available as a command in both cmd.exe and PowerShell.

The Git for Windows installer asks you whether the directory containing git.exe should be added to %PATH%. You can also do this manually. There are no other steps required to "define" something as a command.

Running help in Windows' cmd.exe shows a hardcoded list of commands (most of which hasn't changed since MS-DOS era), but does not actually enumerate all commands available in %PATH%. You can ignore this list.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.