← All courses Claude Code Setup Guide

Set up Git and a project folder

Git is the standard tool for saving versions of your work. Think of "Track Changes" in Word, just for a whole folder, and you decide yourself when a version gets saved.

Why this comes first: Claude Code works on your real files. With Git, you can always go back to an earlier version if something goes wrong. Without Git, gone is simply gone. On Windows there's one more reason: Claude Code explicitly recommends Git. Without Git it only works through PowerShell, with Git it also gets the Bash command line, which a lot of guides rely on.

At the same time, we'll create a fixed home for all your projects: a folder called Developer. That way you never have to search for where something is again, and Claude Code finds its way around easily.

Here's how you do it

Click "Code" at the top left of the app's sidebar. That's the part of the app that can work with files and run commands on your computer. In the input field, you choose that Claude works locally on your computer and in which folder. For now, your Desktop or your home folder is fine. You'll create the proper project folder later in this lesson.

The Claude Desktop App: the Code tab at the top left is marked in red.

Paste this into Claude Code

Copy and paste the block below into a new "session" and send it. A window may pop up asking you to install "Git". If so, confirm it and send the block anyway afterwards, because it also sets up your name and the Developer folder.

Copy this
I'm setting up my computer to work with Claude Code and I'm a complete
beginner. Explain every step in plain English and ask me before you do
anything that's hard to undo.

1. Find out whether I'm on macOS or Windows.
2. Check whether Git is installed (`git --version`). If not, install it:
   - macOS: with `xcode-select --install`. These are Apple's own
     developer tools, and Git is included. Tell me beforehand that an
     Apple window will open that I need to confirm, and wait until
     I'm done. If I already have Homebrew installed,
     `brew install git` works too.
   - Windows: with `winget install --id Git.Git -e --source winget`. winget is
     already built into Windows 10 and 11.
3. Set up my Git identity so my saved versions carry my name.
   Ask me for my name and email address, then set them with:
   git config --global user.name "..."  and  git config --global user.email "..."
4. Create a folder called "Developer" in my home folder if it
   doesn't exist yet. From now on, ALL my projects live there.
5. Confirm the result: show me the Git version and the full path
   to the Developer folder.

How you know it worked

  • git --version prints a version number.
  • There's a Developer folder in your home folder:
    • Mac: /Users/yourname/Developer
    • Windows: C:\Users\yourname\Developer

That's the required part of this lesson done. The rest is background.


The terms you'll keep running into

You don't need to memorize this now. Come back when you run into one of these terms, and read the three lines about it then.

Repository, or repo for short: A project folder where Git keeps track. A normal folder becomes a repository as soon as Git is switched on in it. You'll create your first one in lesson 5.

Commit: A saved version, with a short note about what you changed. Like a save point in a video game, except you write down what happened. You decide when to make one. As long as you don't commit, Git doesn't save anything.

Branch, think of it as a fork in the road: A detour for trying things out. You take the current version, keep working in a side lane, and your original stays untouched. Handy when you want to test a new version of your quote template without breaking the old one. If you like the result, you merge the branch back into the main version. If you don't, you throw it away and nothing happened.

Push and Pull: Up to this point, everything lives only on your computer. Push means uploading your saved versions to an online copy. Pull means getting what someone else uploaded there. You only need either once you have an account with a provider like GitHub, see below.

Pull Request, or PR for short: A proposal to the others: "I did this in my branch, take a look and bring it into the main version." The others comment, and in the end it gets accepted or rejected. That's how several people work on one project without overwriting each other. If you work alone, you'll never need it.

If you really want to understand it

https://learngitbranching.js.org/

The best way to get your head around Git. You type commands and see right next to them, in real time, how the branches move and grow together. Runs in the browser, nothing to install.

The pictures explain more than the text. The first few exercises are plenty to get a feel for it. You won't need the rest for your day-to-day work.

Optional: a GitHub account

GitHub is the best-known place where Git projects live online. You don't need it for this guide. It's worth it as soon as one of these three things happens:

  • You want to work on a project together with someone. Without a shared place, you'll overwrite each other. That's exactly what branches and pull requests are for.
  • You want to copy someone else's project and keep building on it yourself. There's a lot of useful stuff out there in the open.
  • You want an off-site backup. If your computer breaks, everything that only lives on it is gone.

Create an account, about 5 minutes, browser only:

  1. Open github.com and click Sign up.
  2. Enter an email address, a password and a username.
  3. Click the link in the confirmation email.
  4. The free account is all you need.

Connecting your computer to it: Only do this once you've finished lesson 3, because you need the package manager for it. Then paste this into Claude Code:

Copy this
I want to connect my computer to my GitHub account. Explain in plain
English and don't store any login details in our chat.

1. Install the official GitHub tool "gh":
   - macOS:   brew install gh
   - Windows: winget install --id GitHub.cli
2. Start the login with `gh auth login` and walk me through the questions. Choose
   the browser option so I never have to type my password anywhere.
3. At the end, confirm to me that the connection works.

Never in the chat: Passwords and access keys never belong in a chat window. The login above deliberately goes through the browser, where your details stay private.

If something goes wrong

Mac: Just type git --version in the Terminal. If Git is missing, macOS opens a window on its own asking whether to install the developer tools. Confirm it. The installation takes a few minutes.

Copy this
# Mac, trigger it by hand
xcode-select --install

# Windows
winget install --id Git.Git -e

# Set your identity (both systems)
git config --global user.name "Your Name"
git config --global user.email "[email protected]"

# Create the folder
# Mac:
mkdir -p ~/Developer
# Windows:
mkdir %USERPROFILE%\Developer

"git: command not found", right after installing: Close the Terminal and the Claude app and open both again. Newly installed tools are only found in a freshly opened window.