Pular para o conteúdo principal

Update Git on Windows, macOS, or Linux: All Methods Explained

Learn how to check and update your Git version across Windows, macOS, and Linux with easy commands to access the latest features and bug fixes.
25 de mar. de 2026  · 4 min lido

Running an outdated version of Git doesn’t just mean missing out on new features; it can also expose you to security vulnerabilities and lingering bugs that have already been fixed.

If you are getting started with Git, I recommend taking our Introduction to Git course to make sure you already have Git installed and are comfortable using the command line for basic operations.

Checking Your Current Git Version

Before updating, it’s important to know which version of Git you’re currently using. Start by opening your terminal (or Command Prompt on Windows) and run:

git --version

You will see an output that tells you the exact version installed on your system.

How to check your current Git version.

To check if your version is old, compare your version with the latest release listed on the official Git downloads page.

As I had stated earlier, updating Git is important as it includes critical security patches, performance improvements, bug fixes, and new features that can improve your workflow and prevent potential issues down the line.

I recommend trying out our GitHub Foundations and Git Fundamentals skill tracks to learn version control with Git from basics to advanced workflows, including tracking changes, managing repositories, and collaborating efficiently. 

Updating Git on Windows

If you're using Git on Windows, the easiest way to update is through the built-in updater.

Use the built-in update command

Open Command Prompt or PowerShell and run:

git update-git-for-windows

This command automatically downloads and installs the latest version, making it the quickest option.

Manual fallback

If the update command doesn’t work, for example, in older installations (pre-2.17), you can update manually using the following steps:

  • Go to https://gitforwindows.org 
  • Download the latest installer
  • Run it and follow the setup steps. This method will safely upgrade your existing installation.

 If you check your Git version now using git --version, it should show if it’s up to date

How to check your Git version.

Updating Git on macOS

If you’re working on a Mac, you likely have Git installed either through Apple’s Xcode Command Line Tools or a third-party manager. There are two main ways to update Git on macOS, depending on how it was installed.

Using Homebrew

If you installed Git via Homebrew, updating is straightforward. Open your terminal and run:

brew update && brew upgrade git

This command refreshes Homebrew’s package list and upgrades Git to the latest available version.

After the process finishes, restart your Terminal window. This ensures your shell session initializes the new binary path rather than sticking to the cached version.

Updating without Homebrew

If you didn’t use Homebrew, you can update Git manually by following these steps:

  • Visit the official Git downloads page: https://git-scm.com/downloads 
  • Download the latest macOS installer
  • Run the installer and follow the prompts to upgrade your existing version

Regardless of which method you chose, verify the success of the update by running:

git --version

Updating Git on Linux

Updating Git on Linux depends on your distribution and package manager. Here are the most common options:

Ubuntu or Debian

On systems like Ubuntu, Linux Mint, or Kali, you will use the apt package manager. Run the following to refresh your package list and upgrade Git to the latest version available in your repositories.

sudo apt-get update && sudo apt-get upgrade git

Fedora

Fedora uses the dnf package manager, which handles dependencies efficiently. To update, simply run:

sudo dnf upgrade git

CentOS/RHEL

For older versions of CentOS or Red Hat Enterprise Linux (RHEL), you will use the yum package manager to update Git.

sudo yum update git

After updating, confirm the installed version using git --version. If the version number reflects a newer release, your update was successful.

Conclusion

Keeping Git up to date is simple and takes just a single command on most systems. Whether you're on Windows, macOS, or Linux, the update process is quick—and well worth it for the added security, stability, and new features. By making updates a regular habit, you ensure your development environment stays reliable and efficient.

To build stronger Git skills, I recommend taking our Intermediate Git course to learn how to work with Git for large projects and handle complex version control scenarios and issues in data pipeline development and collaborative projects.


Allan Ouko's photo
Author
Allan Ouko
LinkedIn
Data Science Technical Writer with hands-on experience in data analytics, business intelligence, and data science. I write practical, industry-focused content on SQL, Python, Power BI, Databricks, and data engineering, grounded in real-world analytics work. My writing bridges technical depth and business impact, helping professionals turn data into confident decisions.

Git Update FAQs

How do I confirm that Git updated successfully?

Run git --version again and compare it with the latest version listed on the official Git downloads page.

Can I update Git manually on Windows?

Yes, you can download the latest installer from the official Git for Windows website and run it to upgrade your existing version.

Do I need to uninstall Git before updating?

No, most update methods will safely upgrade your existing installation without requiring you to uninstall it first.

How do I update Git on Ubuntu or Debian?

Use sudo apt-get update && sudo apt-get upgrade git to update Git through the package manager.

Why is my Git version not updating to the latest release?

Some Linux distributions provide slightly older stable versions in their repositories, so you may not always get the absolute latest release.

Tópicos

Learn Git with DataCamp

Curso

Introdução ao Git

2 h
66.7K
Aprenda os conceitos básicos do Git para controlar versões em projetos de software e dados.
Ver detalhesRight Arrow
Iniciar curso
Ver maisRight Arrow
Relacionado

Tutorial

Git Setup: The Definitive Guide

In this tutorial, you'll learn how to set up Git on your computer in different operating systems.

Olivia Smith

Tutorial

How to Install Git For Windows

A quick setup guide on how to install Git on Windows via GUI and CLI.
Oluseye Jeremiah's photo

Oluseye Jeremiah

Tutorial

Git Status: How To Track Changes in Your Project with Confidence

Learn how to use the git status command to monitor your repository’s state. This guide is perfect for beginners and early‑career practitioners who want an optimized Git workflow.
Khalid Abdelaty's photo

Khalid Abdelaty

Tutorial

Git Push and Pull Tutorial

Learn how to perform Git PUSH and PULL requests through GitHub Desktop and the Command-Line.

Olivia Smith

Tutorial

Git Clone Command: From Basic Usage to Advanced Techniques

Master the git clone command with this comprehensive guide—covering protocols, options, workflows, and real-world usage across platforms.
Kenny Ang's photo

Kenny Ang

Tutorial

Git Init: How to Initialize and Set Up a Git Repository

Learn how to set up a Git repository with git init, connect to a remote, configure settings, and troubleshoot common issues—all in one beginner-friendly guide.
Khalid Abdelaty's photo

Khalid Abdelaty

Ver maisVer mais