Skip to main content

Lesson 2 of 6 · 15 min

Installing Git and configuring your identity

Get Git running on Windows, Linux or Mac and set your name and email for the first time.

Install Git

Windows: download from git-scm.com and run the installer. The default options are fine.

Linux (Ubuntu/Debian):

sudo apt update
sudo apt install git

Mac:

xcode-select --install

Check it worked

Open a terminal (on Windows, use Git Bash which was installed with Git) and run:

git --version

You should see something like git version 2.45.0.

Tell Git who you are

Every commit is signed with a name and email. This is how project maintainers know who made a change — and how you build a public contribution history employers can see.

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

Tip: use the same email as your GitHub account. Your commits then link to your GitHub profile automatically.

Two more settings that save headaches later:

git config --global init.defaultBranch main
git config --global core.editor "notepad"   # Windows (Linux/Mac: nano)

Check your settings

git config --global --list

If you see your name and email in the output, you are ready. Next lesson: your first repository.

Finished this track? FOSS Andhra certificates are issued for internships, workshops and events — check what you can earn next.