In RStudio, in a project, the git tab shows all files of a directory containing R_user, not the files in R_user.
Instead of seeing files from R_user ="C:/Users/me/OneDrive/Documents/R/work", I see files from "C:/Users/me/OneDrive/Documents/”.
> Sys.getenv("HOME")
[1] "C:/Users/me/OneDrive/Documents"
> getwd()
[1] "C:/Users/me/OneDrive/Documents/R/work"
> Sys.getenv("R_USER")
[1] "C:/Users/me/OneDrive/Documents/R/work"
The RStudio log has:
$HOME
[1] "C:/Users/me/Documents"
$R_USER
[1] "C:/Users/me/Documents"
So, the log and Sys.getenv report different values for R_USER.
If I run git bash from “C:/Users/me/OneDrive/Documents/R/work” I see only files from “C:/Users/me/OneDrive/Documents/R/work”. Shell and terminal show the same correct directory.
The RStudio version is RStudio 2022.07.1+554.
So how do I get the git tab to show the files in "C:/Users/me/OneDrive/Documents/R/work"?