Git basics

Update Git

Get the latest version of Git.

  1. Update Git
    Terminal
    brew upgrade git

Check it worked

  1. Check the version
    Terminal
    git --version
  1. Add the Git team's package sourceNeeds sudo
    Terminal · Ubuntu / Debian
    sudo add-apt-repository -y ppa:git-core/ppa

    Ubuntu's own Git is often a few versions behind.

  2. Update GitNeeds sudo
    Terminal · Ubuntu / Debian
    sudo apt update && sudo apt install -y git

Check it worked

  1. Check the version
    Terminal · Ubuntu / Debian
    git --version
  1. Update Git
    PowerShell
    git update-git-for-windows

    Or: winget upgrade --id Git.Git -e

Check it worked

  1. Check the version
    PowerShell
    git --version