The git version
command is used to display the currently installed version of Git. This is helpful to ensure you are using the correct version for your development needs.
Initial Example
To check the version of Git installed on your system, simply type:
git version
VERSION Options
Option | Description |
---|---|
--build-options | Provide extra details about the build configuration of Git for diagnostic purposes. |
Examples
1. Basic Usage
When you run the command, you will see an output similar to this:
git version 2.30.0
This tells you that you have Git version 2.30.0 installed.
2. Checking for Updates
If you’re troubleshooting issues or need to know if you should update Git, it’s important to verify the installed version.