If you're seeing a message like command is not recognized on Terminal tool window in IntelliJ IDEA or command prompt, you have the option to permanently add a path to the PATH environment variable using the elevated command prompt with the setx
command:
setx /M path "%path%;C:\Program Files\Git\bin"
setx /M path "%path%;C:\Gradle\bin"
Note: path to the bin directory may vary on your system.