Find the executable named git by searching the current directory and PATH.
where gitLocate matching files, commonly executables available through PATH.
where [/r <Dir>] [/q] [/f] [/t] [$<ENV>:|<Path>:]<Pattern>[ ...]The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.
Find the executable named git by searching the current directory and PATH.
where git| Option / clause | Description |
|---|---|
/r <directory> | Search recursively from a directory. |
/q | Return an exit code without printing matching paths. |
/t | Show file size and modification time. |
<pattern> | Specify a file name or wildcard pattern. |
/r <Dir> | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
/f | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
[$<ENV>: | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
/? | Display command help or the supported command-line usage. |
<Dir> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
<ENV> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
<Path> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.