02Install guides · 5 min
Install git
git saves versions of your project so you (and your agent) can see every change and undo mistakes. Almost every coding tool expects it.
Roman Urdu: git aap ke project ka har version save krta ha, ghalti ho toh wapas ja sakte hein. Har coding tool isay use krta ha.
Cost: Free, open source.
Windows
- Easiest: download the standalone installer from git-scm.com/install/windows and click Next through the defaults. It also gives you Git Bash, which Claude Code can use.
- Or, from PowerShell, with winget (this package is not maintained by the Git for Windows team, but works):
$ winget install --id Git.Git -e --source winget - Close and reopen the terminal so it finds
git.
macOS
- Apple ships git with the Command Line Tools. Run this and click Install in the window that opens:
$ xcode-select --install - Or, if you use Homebrew:
$ brew install git
Linux (Ubuntu/Debian)
- Ubuntu, Debian and WSL:
$ sudo apt update$ sudo apt install git - Fedora:
$ sudo dnf install git
Android (Termux)
- Install Termux from F-Droid or GitHub releases. The Google Play build is marked experimental, with missing features; the Termux team says most people should use F-Droid or GitHub. Needs Android 7 or newer.
- In Termux:
$ pkg update$ pkg install git
Check it worked
$ git --versiongit version 2.x.x (2.56.1 was the newest on 2026-12-05)
Common errors
gitis not recognized as an internal or external command (Windows)- Close every terminal window and open a new one. If it still fails, run the installer again and keep the default PATH option.
wingetis not recognized- Use the standalone installer from git-scm.com instead, or install App Installer from the Microsoft Store.
- macOS: "xcode-select: error: command line tools are already installed"
- git is already there. Run
git --version. - "Please tell me who you are" on your first commit
- Set your name and email once:
git config --global user.name "Your Name"andgit config --global user.email "you@example.com".
Official docs
Checked against these pages on 2026-12-05. Tools change: if a step differs, the official page wins.