CurriculumGit BasicsInstalling Git
Lesson 2 of 633%
Beginner4 min+30 XP

Installing Git

Before you can use Git, you need to install it on your machine and configure your identity. This only needs to be done once per machine.

01.Install Git on Your System

On Windows: download the installer from git-scm.com and run it — accept all defaults. On macOS: open Terminal and run "xcode-select --install", or use Homebrew with "brew install git". On Linux (Ubuntu/Debian): run "sudo apt install git". Verify with "git --version".

my-project/
📁my-project/
📁.git/← Git database
📄config
📄HEAD
📁objects/
📁refs/
📄README.md
📁src/

02.Configure Your Identity

Every Git commit records who made it. You must set your name and email once after installing. This information is permanently embedded in every commit you create and is visible to all collaborators. Use --global to apply it to all repos on your machine.

Commit Timeline
a1b2c3d
init
b2c3d4e
feat
c3d4e5f
fix
d4e5f6a
HEAD

Commands

commands — click to reveal output
$
git --version
Verify Git is installed
▼ show output
$
git config --global user.name "Your Name"
Set your display name globally
$
git config --global user.email "you@email.com"
Set your email globally
$
git config --list
View all your config settings
▼ show output
$
git config --global core.editor "code --wait"
Set VS Code as your default editor
KNOWLEDGE CHECK

Why do you need to configure user.name and user.email?

Rate this lesson:
PreviousNext Lesson