I have installed Sublime Text 3 with the Git package but it keeps prompting Git command not found in the PATH variable. Before i update the PATH, i have to figure out where is my Git command.
In Linux, we can get the path of a specific command by which [comamnd].
ex. ~$ which git
Similarly, we can do it in PowerShell using Get-Command.
- Get-Command [command] | Select-Object -ExpandProperty Definition
This is how i get my Git command.
The shorthand for the Get-Command is gcm. So you can do the same as follow.
- gcm [command] | Select-Object -ExpandProperty Definition
Done =)
Reference: StackOverflow – Equivalent of *Nix ‘which’ command in Powershell?