How to Check for Git Installation
It’s easy to check if Git is already installed on your computer.
Open the Terminal in RStudio:
- In RStudio, go to the Terminal tab (bottom left window) or
Tools > Terminal > New Terminal. This will open a command-line interface directly within RStudio. You can also open the existing terminal window, bottom left, right of the ‘Console’ tab.
- In RStudio, go to the Terminal tab (bottom left window) or
Type the command and press Enter:
git --version! If you want to copy and paste, but it doesn’t work with Ctrl + V or Cmd + V, use Shift + Insert, or Edit->Paste
Interpret the output:
If Git IS installed: You will see a message like this, indicating the version number:
git version 2.45.2.windows.1 # (Version number will vary)If you see this, great! You have Git. You can continue with the next steps:
Go back and proceed on the GitHub Desktop pageIf Git is NOT installed: You will see an error message, which varies slightly by operating system:
On Windows:
'git' is not recognized as an internal or external command, operable program or batch file.or ``` The term ‘git’ is not recognized as the name of a cmdlet, function, script file, or operable program.
```
On macOS / Linux:
bash: git: command not foundorzsh: command not found: gitIf you see any of these error messages, Git is not installed or not correctly configured in your system’s PATH. Please proceed to the installation steps below for your operating system.
(Need to Install Standalone Git? (only do this after you installed GitHub Desktop and you can’t use the Git version from that installation for some reason)
For Windows (PC): Follow these detailed instructions: Git Installation on Windows
For macOS: Follow these detailed instructions: Git Installation on macOS
(Just in case we need to authenticate for GitHUb access with a Personal Access Token (PAT), instructions are here)