How to Install Git |Video upload date:  · Duration: PT6M54S  · Language: EN

Step by step guide to install Git on Windows Mac and Linux with basic configuration and verification for developers

Why Git matters and why you should care

If you write code and do not use version control you are living dangerously and will one day weep into a backup drive. Git is the industry standard for tracking changes, collaborating with others, and pretending you always knew what you were doing. This guide walks through how to install Git across Windows Mac and Linux and how to handle the basic git config and SSH key steps so your developer tools behave.

Choose an install method

There are two common routes. Use the native installer with a GUI if you enjoy clicking through prompts. Use the package manager if you prefer speed and less small talk. Both paths lead to the same place, which is a functioning Git on your machine.

Windows

For git install windows users download the official installer from git-scm.com and run the setup. Accept the defaults unless you have strong feelings about line ending handling. Yes clicking Next repeatedly is an acceptable life choice for most people.

macOS

For git install mac use Homebrew with brew install git if you have Homebrew. If you prefer a GUI installer you can get one from the same git-scm.com page. The Homebrew path is faster and less conversational.

Linux

For git install linux prefer your distro package manager. On Debian based systems run sudo apt update and sudo apt install git. On Fedora use sudo dnf install git or on CentOS use sudo yum install git. Package managers keep things tidy and avoid the installer small talk.

Verify the installation

Open a terminal or Windows command prompt and run the version command to confirm Git is present. If it prints a version number you are in business.

git --version

Configure your identity so you do not commit as anonymous

Set a global user name and email so commits are attributed correctly. These are global settings that apply to all repositories on your machine unless you override them per repo.

git config --global user.name 'Jane Developer'
git config --global user.email 'jane@example.com'

Generate an SSH key and test authentication

An SSH key lets you push and pull without typing credentials every five minutes. Create an ed25519 key which is modern and compact.

ssh-keygen -t ed25519

Then copy the public key file id_ed25519.pub and add it to your hosting account. Most hosts have a web UI to paste the key. Finally test the connection with the host. For GitHub run this test command and expect a friendly message.

ssh -T git@github.com

Troubleshooting and quick tips

  • If git --version fails check your PATH or reinstall with the package manager.
  • If pushes fail check that your public key was added to the host and that the key agent is running.
  • If you see wrong author info use git config --global user.name and git config --global user.email to inspect current values.
  • Prefer HTTPS over SSH if your environment blocks SSH traffic, but SSH is better for developer ergonomics long term.

This covers the essentials for installing Git and getting basic configuration and SSH authentication working. If you want to learn branching and merging next that is where things get fun and slightly chaotic in a productive way.

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.