Master Git in 5 Steps: Setup, Commit, Branch, Collaborate

Master Git in 5 Steps: Setup, Commit, Branch, Collaborate

🧰

Instant Toolkit

3 artifacts

📋
Step-by-Step Guide

1

Install Git

Windows

Download the installer from git-scm.com/download/win and run it with default settings.

macOS

Open Terminal and run git --version. Install Xcode Command Line Tools if prompted. Or download from git-scm.com/download/mac.

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install git

Configure Git

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global init.defaultBranch main
git config --list

Verify your settings appear correctly.

Why this step matters:
  • -Sets up a reliable version control environment on your machine
  • -Proper configuration attributes commits correctly in team projects
30-60 minutes
Web Browser, Terminal/Command Prompt, Text Editor
$0
Definition of Done
  • `git --version` shows 2.x or later
  • `git config --list` displays your name and email
  • New repos default to 'main' branch
Common Mistakes to Avoid

Skipping global configuration or using incorrect email

Always use `--global` and match your GitHub email

Not verifying installation post-install

Run `git --version` and `git config user.name` immediately

Installing without updating package manager on Linux

Run `sudo apt update` before `apt install git`

2

Following along, or just reading? 👀

Spin up a personalized “learn Git” plan you can save, check off, and return to anytime — unlimited on the free trial.

Start free trial →
3
4
5