- In your RStudio version control preferences, click that "Browse..." button again.
- When the file browser dialog opens, type ⌘ShiftG (this is the "Go to Folder…" shortcut from the Finder's Go menu).
- A sheet will drop down, allowing you to enter a path directly. Enter
/usr/bin/git and hit Return (or click Go), and you will be transported to the right spot, with git selected.
- Click Open to exit the dialog and return to RStudio preferences, with your git location restored.
If you're using a recent version of MacOS, this might also be of interest:
The reason your inadvertent preference change persisted through a reinstallation of RStudio Desktop is that preferences are stored in a hidden folder at ~/.rstudio-desktop. See here for more: