Fixing issue in macOS where git stops working after updating R #29
Replies: 1 comment
-
Thank you Ernest! I did not have my MacOS updated at the beginning. |
Beta Was this translation helpful? Give feedback.
-
Thank you Ernest! I did not have my MacOS updated at the beginning. |
Beta Was this translation helpful? Give feedback.
-
Recently, we have encountered issues of students using macOS machines not being able to use git from RStudio. This has been noted after updating the version of R in their machines. In some cases, this was noted after updating the macOS version of their machines (similar issues here - https://community.rstudio.com/t/rstudio-ide-not-finding-git-after-macos-update/3187).
It is likely that the main issue is the updating of macOS and that the updating of the R version is just coincidental. And the main recommended fix to this issue is to re-install the Command Line Tools (CLT) for macOS. There are many ways to do this but the most consistent and straightforward way is to update and install via the terminal.
Open RStudio
Click on the Terminal tab (the tab beside the R console). If this tab is not showing in your RStudio, click on the
Tools
tab on RStudio, then selectTerminal
in the dropdown menu, and then selectNew Terminal
in the next dropdown menu. This should now show a Terminal tab on RStudio.On the Terminal, issue/type the following command:
and then press enter.
The installation process for the Command Line Tools should now proceed. Accept all prompts as you would when installing any software in macOS.
After the installation, close RStudio.
Then re-open RStudio and test that git is working via RStudio by going to a git-based project and then making a commit and pushing to your remote repository.
cc: @OxfordIHTM/class-2024
Beta Was this translation helpful? Give feedback.
All reactions