Skip to Content

Cài đặt Git

Cài đặt trên Windows

Cách 1: Git for Windows (Khuyến nghị)

  1. Truy cập git-scm.com/download/win 
  2. Tải file installer
  3. Chạy installer và chọn các tùy chọn:
    • ✅ Git Bash Here
    • ✅ Git GUI Here
    • ✅ Use Git from Windows Command Prompt

Cách 2: Winget (Windows 11)

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

Cài đặt trên macOS

Cách 1: Xcode Command Line Tools

xcode-select --install

Cách 2: Homebrew (Khuyến nghị)

# Cài Homebrew (nếu chưa có) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Cài Git brew install git

Cài đặt trên Linux

Ubuntu/Debian

sudo apt update sudo apt install git

Fedora

sudo dnf install git

Arch Linux

sudo pacman -S git

Kiểm tra cài đặt

Mở Terminal/Command Prompt và chạy:

git --version

Kết quả mong đợi:

git version 2.43.0

Tiếp theo

Sau khi cài đặt, hãy Cấu hình Git với thông tin cá nhân của bạn.

Last updated on