Free setup guide · 10 minutes
Set up Git
Install Git, tell it your name, and check that it is version 2.28.0 or higher. Works on Windows, macOS and Linux.
What is Git?
Git saves snapshots of your project, so you can go back to any earlier version. Think of "save game" points in a video game. If something breaks, you load the last good save.
Every project in this course is saved with Git. Shopify CLI also uses Git to download themes and app templates.
| You need | Version |
|---|---|
| Git | 2.28.0 or higher |
Step 1: Open a terminal
A terminal is a window where you type commands instead of clicking.
- Press the Windows key.
- Type
PowerShell. - Click Windows PowerShell.
- Press Cmd + Space.
- Type
Terminal. - Press Enter.
Press Ctrl + Alt + T, or open Terminal from your apps.
Step 2: Check if Git is already installed
git --versionOn our Windows computer, Git was already installed. This is the real output:
git version 2.55.0.windows.2- You see 2.28.0 or higher (like 2.55.0): Git is installed. Go to Step 4.
- You see a lower number (like 2.17): install the new version in Step 3.
- You see an error like
git : The term 'git' is not recognizedorcommand not found: install it in Step 3.
Step 3: Install Git
- Open git-scm.com/install/windows (opens in a new tab).
- Download the latest x64 version of Git for Windows.
- Open the downloaded file.
- Click Next on each screen and keep the default options.
- Click Install, then Finish.
Or install it with one command in PowerShell:
winget install --id Git.Git -e --source wingetThe easiest way uses a free tool from Apple. Run this, then click Install in the window that opens:
xcode-select --installIf you already use Homebrew, you can run brew install git instead.
For Ubuntu and Debian:
sudo apt-get install gitFor Fedora:
sudo dnf install gitgit --version. It prints a line that starts with git version.Step 4: Tell Git who you are
Git puts your name on every snapshot you save. Set it once, with your own name and email:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"These commands print nothing when they work. Check your name:
git config --global user.nameYour Name--global means "for every project on this computer", so you only do this once.
Common problems
git is not recognized
Why: The terminal was open before you installed Git, so it does not know about it yet.
Fix: Close every terminal and VS Code window, then open a new one. On Windows, restart the computer if it still fails.
The Mac asks to install "command line developer tools"
Why: That is Apple's tool that includes Git.
Fix: Click Install and wait. Then run git --version again.
Git asks "Please tell me who you are"
Why: You skipped Step 4.
Fix: Run the two git config commands from Step 4, then try again.
Next step
Git is ready. If you have not yet, set up Node.js. Then go back to your lesson.