Installing Visual Studio Code

Before installing Git, let's set up Visual Studio Code — a powerful code editor with excellent Git integration. Follow the instructions below for your operating system:

Windows, macOS and Linux

  1. Visit the official VS Code website: https://code.visualstudio.com/
  2. Click the download button for your operating system.
  3. Run the installer and follow the on-screen instructions.
  4. After installation, open Visual Studio Code to confirm it works correctly.

Visual Studio Code offers excellent Git integration, including:

Installing Git

Now that VS Code is ready, let's install Git. Follow the instructions for your operating system:

Git installation process animation

Git installation process demonstration

Windows

  1. Visit the official Git website: Git for Windows
  2. Download and run the installer.
  3. Follow the installer steps, keeping the default options.
  4. After installation, open VS Code, press Ctrl+` to open the integrated terminal and type git --version to verify the installation.

macOS

  1. Open the Terminal in VS Code (Ctrl+`).
  2. Install Homebrew (if not already installed):
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Install Git with Homebrew:
    brew install git
  4. Verify the installation by typing git --version in the VS Code terminal.

Linux (Ubuntu/Debian)

  1. Open the Terminal in VS Code (Ctrl+`).
  2. Update system packages:
    sudo apt update
  3. Install Git:
    sudo apt install git
  4. Verify the installation by typing git --version.

Configuring Git in VS Code

After installing Git, VS Code will automatically detect it. To start using Git in VS Code:

  1. Open a project or folder in VS Code.
  2. Click the Source Control icon in the left sidebar (branch icon).
  3. Click "Initialize Repository" to start a new Git repository, or use Git commands directly in the integrated terminal.

You're now ready to use Git with Visual Studio Code!

Support this project

Help keep this project online by making a donation.