Install Git

Installing and updating Git across different operating systems requires different installation approaches. Always ensure you have the latest version of Git. Here's how to manage the Git install:

Windows

  1. Got to https://git-scm.com/download/win. Git for Windows website appears.

  2. Click the download button. Download automatically starts.

  3. Open the command prompt by accessing the cmd. The cmd screen appears.

  4. Access the file location where it is downloaded. cd Downloads

  5. Run the installer by using the start command. start Git-2.35.1-64-bit.exe The installation process starts. Replace the name "start Git-2.35.1-64-bit.exe" beginning with the Git with the file name. The installation process starts.

  6. Follow the installation wizard guidelines and complete the installation process. During the installation process, select the Git Bash and Git GUI as components.

  7. Click Finish when the installation process is complete.

  8. Run the version command to see if the installed git is the latest version. git --version

Mac OS

  1. For macOS, the easiest way to install Git is to use the standalone installer:

    • Visit Git's website and download the latest macOS installer.

    • Run the installer and follow the on-screen steps.

  2. Alternatively, you can use Homebrew by running brew install git in the Terminal.

Linux

  1. For Ubuntu/Debian-based systems, use sudo apt-get install git to install Git.

  2. For Fedora/RHEL-based systems, the command is sudo yum install git.

Remember to routinely check for updates to ensure you're using the most current version of Git.

Last updated