Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Check and Update Your Git Version

See which Git you have and upgrade it on Linux, Windows or macOS.

How-To Guides1 min read1 screenshot

Check your Git version

Open a terminal (or Git Bash on Windows) and run:

git --version

The answer looks like git version 2.45.1.

Update Git

Linux (Debian and Ubuntu)

sudo apt update
sudo apt install git

This installs the newest version that your distribution offers. For the latest release, add the Git PPA:

sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt install git

Linux (CentOS, Rocky, Fedora)

sudo dnf update git

Windows

On Git for Windows 2.16.1 and later you can update from the command line:

git update-git-for-windows

Or download the newest installer from the Git website and run it.

The Git download page

macOS

If you installed Git with Homebrew:

brew upgrade git

Check again

git --version

Quick recap

  • git --version shows the version.
  • Update with apt, dnf, brew or git update-git-for-windows.
  • Check the version again after the update.