Easy Guide: How to Install Git on Windows, Linux, and Mac
This video demonstrates the process of installing Git on Ubuntu (Linux) and Windows systems, covering verification of existing installation, use of package managers, and step-by-step setup with default options.
1. Installing Git on Ubuntu
The video starts with a check to see if Git is already installed on the Ubuntu system by running the command to verify the version. If Git is not installed, a package manager command is used to install it.
- Run the command to check if Git is installed:
BASH
git --version - If Git is not found, install it using the system package manager with root privileges:
BASH
sudo apt install git - For Fedora-based systems, use:
BASH
sudo dnf install git - This ensures the Git Source Control Management (SCM) tool is installed from official repositories.
2. Downloading and Installing Git on Windows
On Windows, the process involves downloading an installer from the official Git website and running through the setup wizard with mostly default options.
- Download the 64-bit or 32-bit installer based on your system specifications.
- Run the downloaded installer and proceed through multiple "Next" steps, keeping default settings:
- Keep the default editor as Vim.
- Accept Git branch handling defaults.
- Wait for files to extract and installation to complete.
- Launch Git Bash from the Start menu to begin using Git on Windows.
3. Verifying Git Installation
Once installation completes on either platform, verify by running the version command in the terminal or Git Bash:
- Execute:
BASH
git --version - A version number output confirms successful installation.
Key Insights
- Git is pre-installed on many Linux distributions but may require manual installation on some.
- Package managers (
apt,dnf) simplify Git installation on Linux systems. - Windows requires downloading and running an installer, which defaults to commonly used settings.
- Git Bash is the recommended interface on Windows for Git commands.
- Confirmation of installation is done through checking the Git version via command line.
Summary Table: Git Installation Commands and Steps
This guide provides a clear, concise overview of installing Git across these popular operating systems, emphasizing practical steps and verification.