Let's get Git on your machine. The installation takes 2 minutes. The configuration takes 30 seconds. Then you're ready.
| OS | How to Install |
|---|---|
| Windows | Download from git-scm.com/download/win → run the installer → keep all defaults |
| macOS | Open Terminal → type git --version → it prompts you to install Xcode CLI tools → click Install |
| Ubuntu/Debian | sudo apt-get install git |
| Fedora/RHEL | sudo dnf install git |
# Check if Git is installed
git --version
# Output: git version 2.43.0 (or similar)
# Tell Git who you are (this shows up in every commit)
git config --global user.name "Rahul Sharma"
git config --global user.email "rahul.sharma@gmail.com"
# Verify your config
git config --listUse the same email for git config and your GitHub account. This links your commits to your GitHub profile — your green contribution graph depends on this. Interviewers do check your GitHub profile.
# Default branch name "main" (not "master")
git config --global init.defaultBranch main
# Use VS Code for editing commit messages
git config --global core.editor "code --wait"
# Colored output — easier to read
git config --global color.ui autoWindows users: during Git installation, choose "Git from the command line and also from 3rd-party software" when asked about PATH. If you skip this, git commands won't work in your terminal.
Key Point: Install Git, set your name and email, and you're ready. The whole setup takes under 3 minutes.