Part 1 of 2November 2026
Getting set up: GitHub, Git, and Claude Code
A start-to-finish setup guide for Mac or Windows, no experience needed: a GitHub account, Git, a one-time browser login with the GitHub CLI, and Claude Code.
This guide walks you through everything you need to use Claude Code with project files on GitHub, on a Mac or a Windows PC. You don’t need any technical background. If you can click, copy, and paste, you can do this. 🙂
This is part 1 of 2. Do it once, and you never have to do it again. Then part 2, Let’s git started, explains what all of this actually is, and how to make your first change.
There are seven sections, and each one ends with a check, so you know it worked before you move on. Already have some of this? Use the chapters to skip ahead.
Along the way, you’ll see three kinds of boxes:
Create your GitHub account
GitHub is a website where people store project files. Skip to the next section if you already have an account you want to use.
- Open your web browser and go to github.com/signup.
- Enter your email address, create a strong password, and choose a username. Pick something professional, for example your first and last name (like jane-smith). Write your username down; you’ll need it.
Turn on two-factor authentication
Two-factor authentication (2FA) means GitHub asks for a code from your phone when you log in.
- On your phone, install an authenticator app from the App Store or Google Play. Microsoft Authenticator and Google Authenticator are both free.
- On GitHub, click your profile picture (top right corner), then Settings.
- In the left menu, click Password and authentication.
- Click Enable two-factor authentication and follow the steps: scan the QR code with your authenticator app, then type the 6-digit code the app shows.
- GitHub shows you recovery codes. Click Download and save the file somewhere safe, like your password manager. These codes are the only way back into your account if you lose your phone.
Get access to the project
If you’re working on your own project, you already have access: skip to the next section. If it’s someone else’s:
- Send whoever owns the project your GitHub username, and ask them to invite you.
- Wait for an email from GitHub with an invitation to collaborate on a repository.
- Open the email and click View invitation, then Accept invitation on the GitHub page.
Open the Terminal
The Terminal is a plain text window where you type (or paste) instructions for your Mac. It looks old-fashioned, but you only need to paste what this guide gives you and press Return.
- Hold ⌘ Cmd and press Space. A search bar appears in the middle of the screen.
- Type Terminal and press Return. A window with a blinking cursor opens. This is the Terminal.
- To run a command from this guide, paste it into the Terminal window and press Return.
Practice
Paste this into the Terminal and press Return:
echo HelloGood to know
- When you type a password in the Terminal, nothing appears on screen, not even dots. That’s normal. Type it and press Return.
- To move the cursor inside a command you pasted, use the left and right arrow keys. Clicking doesn’t move it.
The Terminal is a plain text window where you type (or paste) instructions for your computer. On Windows it runs PowerShell. It looks old-fashioned, but you only need to paste what this guide gives you and press Enter.
- Press the ⊞ Win key, type Terminal, and press Enter. A window with a blinking cursor opens. On Windows 10, if nothing called Terminal comes up, type PowerShell instead.
- To run a command from this guide, copy it, paste it into the Terminal with Ctrl + V (or just right-click), and press Enter.
Practice
Paste this into the Terminal and press Enter:
echo HelloGood to know
- When you type a password in the Terminal, nothing appears on screen, not even dots. That’s normal. Type it and press Enter.
- To move the cursor inside a command you pasted, use the left and right arrow keys. Clicking doesn’t move it.
- Ctrl + C doesn’t copy in the Terminal: it stops whatever is running. To copy text from the Terminal, highlight it and use Ctrl + Shift + C, or right-click.
Install Git
Git is the program that downloads project files to your Mac and keeps them in sync with GitHub.
Open the Terminal (see “Open the Terminal”).
Paste this and press Return:
Terminalgit --versionIf a pop-up says the git command requires the command line developer tools, click Install, then Agree. The download can take 5 to 20 minutes. Wait until it says it’s finished, then click Done.
If you don’t see a pop-up and see a version number instead, Git is already installed. Skip to “Tell Git who you are”.
Paste the same command again and press Return:
Terminalgit --version
If you get an error about Xcode
Try these, one at a time, running git --version again after each:
Point your Mac at the command line tools:
Terminalsudo xcode-select --switch /Library/Developer/CommandLineToolsMake sure Xcode is up to date: open the App Store, search for Xcode, and update it.
Accept the Xcode license, and allow any software updates it asks for:
Terminalsudo xcodebuild -license accept
sudo asks for your Mac password. Remember, nothing shows up while you type it.
Git is the program that downloads project files to your computer and keeps them in sync with GitHub. On Windows it comes as Git for Windows, which Claude Code also needs.
In your browser, go to git-scm.com/downloads/win and click the download for 64-bit Git for Windows Setup.
Open the downloaded file. If Windows asks whether to let it make changes to your device, click Yes.
The installer asks a lot of questions. The defaults are right for all of them: keep clicking Next, then Install, then Finish.
Close the Terminal completely and open it again, so it notices Git. Then paste this and press Enter:
Terminal · PowerShellgit --version
Tell Git who you are
Every change you save is labelled with your name and email. You only do this once.
Copy the line below and paste it into the Terminal, but before pressing ReturnEnter, replace Your Name with your real name. Keep the quote marks. Then press ReturnEnter.
Terminalgit config --global user.name "Your Name"Do the same with this line, using the same email you used for GitHub:
Terminalgit config --global user.email "you@example.com"Paste this to check your settings:
Terminalgit config --global --list
Connect your computer to GitHub
You’ll install the GitHub CLI, a small official tool from GitHub, and use it to log in once through your web browser. After that, your computer stays connected to your GitHub account. There are no keys or extra passwords to manage.
Download and install the GitHub CLI
In your browser, go to github.com/cli/cli/releases/latest.
Scroll down to the Assets section and click the file whose name ends in macOS universal to download it. You may need to click Show all assets to see it. The full name includes a version number, which is fine.
Open your Downloads folder and double-click the downloaded .pkg file.
If your Mac says the file can’t be opened, or that it’s from an unidentified developer: click Done or OK to close the message. Open System Settings › Privacy & Security, scroll down, and click Open Anyway next to the message about the file. Enter your Mac password if asked, then click Open.
Follow the installer: click Continue, then Install. Enter your Mac password if asked. Click Close when it finishes.
Quit the Terminal completely (⌘ Cmd + Q) and open it again. Then paste this and press Return:
Terminalgh --version
In your browser, go to github.com/cli/cli/releases/latest.
Scroll down to the Assets section and click the file whose name ends in windows_amd64.msi to download it. You may need to click Show all assets to see it. The full name includes a version number, which is fine.
Open your Downloads folder and double-click the downloaded .msi file.
If a blue Windows protected your PC box appears, click More info, then Run anyway.
Follow the installer: click Next, then Install. If Windows asks whether to let it make changes, click Yes. Click Finish when it’s done.
Close the Terminal completely and open it again. Then paste this and press Enter:
Terminal · PowerShellgh --version
Log in to GitHub
Here’s the whole thing at a glance. It takes about a minute.
What the login looks like
- Terminal
! First copy your one-time code:
ABCD-1234
Press Enter to open github.com in your browser…
1The Terminal gives you a one-time code. Copy it, then press Return.
- github.com/login/device
Device Activation
ABCD-1234Continue
2Your browser opens GitHub. Paste the code and click Continue.
- github.com/login/device
Authorize GitHub CLI
GitHub CLI wants to access your account
Authorize github
3Click Authorize. GitHub may ask for your password or 2FA code.
- Terminal
✓ Authentication complete.
✓ Logged in as your-username
$ ▍
4Back in the Terminal: you’re logged in, for good.
Make sure you’re logged in to GitHub in your web browser.
In the Terminal, paste this and press ReturnEnter:
Terminalgh auth login --hostname github.com --git-protocol https --webIf it asks Authenticate Git with your GitHub credentials?, type Y and press ReturnEnter.
The Terminal shows a one-time code (8 letters and numbers, like ABCD-1234). Write it down, or highlight and copy it.
Press ReturnEnter. Your browser opens a GitHub page. (If it doesn’t, go to github.com/login/device yourself.)
Type or paste the one-time code into the GitHub page and click Continue.
Click Authorize github. GitHub may ask for your password or 2FA code. Enter it.
Go back to the Terminal.
Double-check the connection
Paste this and press ReturnEnter:
gh auth statusInstall Claude Code
You can use Claude Code in one of two ways, and you can install both:
- Option A, the Claude desktop app: a normal app with windows and buttons. Claude Code lives in its Code section. This is the most familiar if you prefer clicking.
- Option B, the Terminal: you type
claudein the Terminal and chat with it there.
Option A: the Claude desktop app
- In your browser, go to claude.ai/download and download the Mac version.
- Open the downloaded file and drag the Claude icon into the Applications folder.
- Open Claude from your Applications folder (or press ⌘ Cmd + Space, type Claude, and press Return). If your Mac asks whether you’re sure you want to open it, click Open.
- Sign in with your Claude account.
- Click the Code tab.
- In your browser, go to claude.ai/download and download the Windows version.
- Open the downloaded file. It installs itself and opens Claude when it’s done.
- Sign in with your Claude account.
- Click the Code tab.
Option B: Claude Code in the Terminal
Open the Terminal. Paste this and press Return:
Terminalcurl -fsSL https://claude.ai/install.sh | bashIt may look like nothing is happening while it downloads. Wait for the blinking cursor to come back.
Quit the Terminal completely (⌘ Cmd + Q) and open it again. Then check it installed:
Terminalclaude --version
Open the Terminal. Paste this and press Enter:
Terminal · PowerShellirm https://claude.ai/install.ps1 | iexIt may look like nothing is happening while it downloads. Wait for the blinking cursor to come back.
Close the Terminal completely and open it again. Then check it installed:
Terminal · PowerShellclaude --version