How to Check and Update Your Git Version on Linux, Mac, and Window

Git is a popular open-source version control system that you, as a developer, use in your daily workflow. As with any other software, you need to make sure you are always using the latest version.


Learn how to check the Git version running on your computer and update Git if you’re not running the latest update.


How to check your git version

After installing Git on your Mac, Windows, or Linux computer, you rarely consider an upgrade. This is because you will never be notified when new updates are available. However, as you probably already know, updating your software and apps is essential and you should do so as soon as new updates are available. It helps fix bugs, improve performance and add new features.

To check your Git version on Linux, Mac, and Windows, do the following:

  1. Open your Terminal (Linux, macOS), Command Prompt (Windows), or other command line interface of your choice.
  2. Type git –version and hit Enter to run the command.

Running this command will show your current git version.

How to update Git

Once you know your current Git version, the next step is to make sure it’s the latest version. However, you don’t have to check for the latest version. If you already have the latest version installed, the update process will notify you.

Let’s show you how to update your git on all three platforms, starting with Linux.

Update Git on Linux

Linux offers the easiest way to update Git because you don’t have to update it separately from other software. Every time you update Linux, the process automatically updates Git and other installed packages.

You can still update Git individually if you want, but the command you need to use depends on your package manager.

Update Git on macOS

If you installed Git with Homebrew on your Mac, the brew command is all you need:

brew upgrade git

The command will issue a warning if you already have the latest version of git.

Although macOS ships with an installed version of Git, the company is usually a bit slow in shipping updates. Because of this, you should use Homebrew if you want the very latest version. It’s free and open source and makes the whole process easier. In addition, updates are delivered more frequently.

Alternatively, you can download and install the latest installer from Git’s official website. Your Git version will be updated automatically.

Update Git on Windows

Updating Git on Windows depends on the version you’re running. If you are using Git version 2.14.1 or older, you must uninstall Git first. After that, download Git and reinstall it on your Windows computer.

If you’re running anything from 2.14.2 to 2.16.1, run it Git update at your command prompt. Use for version 2.16.1 and later git update-git-for-windows instead of this.

Just update Git on your computer

Whether you’re using Git on Linux, macOS, or Windows, there’s no excuse for not running the latest version. Make sure you know how to update your software and always enjoy the latest features. That goes double for software you install on a server that others might also be using.

Leave a Reply

Your email address will not be published. Required fields are marked *