I post it on the Github issue before and jmcphers found out the PATH in the rstudioDiagnosticsReport() did not contain Git.
He suggests I ask a help here.
Something I have already done below and taken screenshots on the Github
I set the right path in the global variable in the Windows system.
@EconKid - You can try setting up the path through RStudio --> Tools --> Global Options --> Git/SVN and then browse to the git.exe and restart RStudio.
In the RStudio terminal, type echo $PATH and see if that includes the path for Git. If it doesn't, you may have changed the PATH variable after opening RStudio. After they're opened, some applications don't see changes to environment variables.
However, the RStudio Terminal still cannot find the git.
$ which git
which: no git in (/d/software/R-3.5.1/bin/x64:/c/Windows/System32:/bin:/c/Windows/System32:/bin:/d/software/RStudio_preview/RStudio/bin/msys-
ssh-1000-18)
Did you try the settings in RStudio Option that @heramb adviced ?
The setting through windows pane seems correct. Note that it required a reboot of the computer to take effect - I think the variable are loaded into the session when started.
It is like the PATH variable is not taken into account by RStudio. Which version of Rstudio is this ?
As a workaround to get command line in RStudio, you could be able to open a shell from the git pane (not the Rstudio Terminal).
In the Terminal Global option, which terminal did you select ?
@EconKid - These can be very lame steps but do come handy sometimes.
Close your RStudio
Go To Start --> Run and type in %localappdata%/
Locate RStudio-Desktop in this folder and then either rename it if you want to take a look at it or delete it. (These are info files from RStudio. If RStudio doesn't find this in %localappdata%/, it creates a fresh copy.)
While you follow the above steps try also uninstalling and re-installing git-scm. Once you install, restart your machine and then open RStudio and check if git becomes available.
The reason for doing this is sometimes, few of the files either do not get correctly installed or do not get mapped. Its like an unknonw variation in statistical models
Unfortunately you can't use reprex with rstudioapi because a reprexed code is run outside without RStudio
For this kind of answer, a reprex is not needed, you can just tell us the version number.