my-notes

Installing_Git

1 min read

Installing Git

Get Git installed on any operating system.


πŸ–₯️ Windows

winget install --id Git.Git -e --source winget

Installs Git using Windows Package Manager. The -e flag ensures exact match.


Using Chocolatey

choco install git

Installs Git using Chocolatey package manager.


Manual Download

Download from: https://git-scm.com/download/win


🍎 macOS

brew install git

Installs Git using Homebrew package manager.


Using Xcode Command Line Tools

xcode-select --install

Installs Git along with other developer tools from Apple.


Manual Download

Download from: https://git-scm.com/download/mac


🐧 Linux

Ubuntu / Debian

sudo apt update

Updates package list.

sudo apt install git

Installs Git from apt repository.


Fedora

sudo dnf install git

Installs Git using DNF package manager.


Arch Linux

sudo pacman -S git

Installs Git using Pacman package manager.


CentOS / RHEL

sudo yum install git

Installs Git using YUM package manager.


βœ… Verify Installation

git --version

Displays the installed Git version. Example output: git version 2.43.0


πŸ”„ Update Git

Windows (Winget)

winget upgrade --id Git.Git

Updates Git to latest version using Winget.


macOS (Homebrew)

brew upgrade git

Updates Git to latest version using Homebrew.


Linux (Ubuntu/Debian)

sudo apt update && sudo apt upgrade git

Updates Git to latest version from apt repository.


πŸ“Š Installation Flow

graph TD
    A[Choose OS] --> B{Windows?}
    B -->|Yes| C[winget install Git.Git]
    B -->|No| D{macOS?}
    D -->|Yes| E[brew install git]
    D -->|No| F{Linux?}
    F -->|Yes| G[apt/dnf/pacman install git]
    C --> H[git --version]
    E --> H
    G --> H
    H --> I[βœ… Git Installed]


#git #installation #setup

Built with mdgarden