Install Git

What

Git is a command-line utility. To use it, you must install the Git package on your operating system and ensure it is updated to a recent version (ideally 2.46.0 or later).

How

You can check your current Git version and install or update it using your system’s package manager:

# Check your installed Git version
git version

If you need to install or update Git:

  • macOS (via Homebrew):

    brew update
    brew install git
  • Linux (Ubuntu/Debian):

    sudo apt update
    sudo apt install git
  • Windows: Download and install the latest installer from the official website (git-scm.com).

Why

Using an up-to-date version of Git ensures you have the latest performance improvements, security patches, bug fixes, and modern features (such as improved commands and configurations).

Summary

Installing and keeping Git up to date on your local system is the first step toward managing your code history efficiently.