Script Valley
Git and GitHub Complete Course: From Beginner to Advanced
Introduction to Version Control and Git BasicsLesson 1.2

Installing Git and Initial Configuration

Git installation, git config, user name, user email, default editor, .gitconfig

Installing Git and Initial Configuration

Before using Git, you must install it on your system and configure your identity. Git uses your name and email to label every commit you make.

DiagramGit Installation and Configuration Steps

IMAGE PROMPT (replace this block with your generated image):

Flat numbered-step checklist diagram on white background. Title: Setting Up Git: Install and Configure. Three OS installation cards at top in a row. Card 1: Windows icon — label Download installer from git-scm.com. Card 2: Apple icon — label brew install git in monospace. Card 3: Linux penguin icon — label sudo apt install git in monospace. Each card has a light #3A5EFF (#e8ecff) fill and #3A5EFF border. Below cards: a vertical checklist of four configuration commands, each in a pill-shaped row with a step number circle in #3A5EFF. Step 1: git config --global user.name "Your Name". Step 2: git config --global user.email "you@example.com". Step 3: git config --global core.editor "code --wait". Step 4: git --version → shows version badge (green check). Monospace font for commands, sans-serif for labels, white background.

Installation

On Windows, download Git from git-scm.com and run the installer. On macOS, run xcode-select --install or install via Homebrew with brew install git. On Linux (Ubuntu/Debian), run sudo apt install git.

Configuring Your Identity

After installation, open a terminal and set your name and email:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

The --global flag applies these settings to every repository on your machine. You can override them per repository by running the same commands without the flag inside a specific project folder.

Setting the Default Editor

Git opens a text editor for commit messages. Set it to your preferred editor:

git config --global core.editor "code --wait"

Replace code --wait with vim, nano, or any editor command. You can view all your configuration with git config --list.

Verifying the Installation

Run git --version in your terminal. You should see output like git version 2.x.x. If you see this, Git is correctly installed and ready to use.

Up next

Creating Your First Repository

Sign in to track progress