If you are building software with Claude, one of the best habits you can develop early is using GitHub to track your project.
GitHub keeps a history of every change you make. If something breaks, you can see what changed and go back to a working version.
Many AI tools can manage Git automatically, but I strongly recommend doing the workflow manually a few times first. Once you understand it, everything becomes much easier.
This guide walks through the full setup from zero.
Step 0: Install Claude
Use this prompt in Claude Web to get started:
I am a complete beginner with no coding experience. I need you to help me install Claude Code on my computer step by step.
Please start by asking me:
What operating system I have (Mac, Windows, or Linux)
What version it is if I know it
Then walk me through the entire installation process one step at a time. For each step:
Give me only ONE command at a time
Tell me exactly where to type it (I may not know what a terminal is)
Tell me what I should see on screen if it worked
Tell me what to do if I see an error
Wait for me to confirm it worked before moving to the next step
I need to install everything from scratch including any prerequisites like Node.js. Assume I have nothing installed and no technical knowledge. Use plain English, no jargon. If you must use a technical term, explain what it means.
My goal is to have Claude Code running in my terminal by the end of this.
After set up, if you type claude in the terminal, you will see setup instructions. Claude setup will ask you to sign into your Claude Pro ($20/mo) subscription account.
If you ever run into errors, simply copy and paste into Claude web browser chat to help you.
Step 1: Create a Development Folder
Tell Claude Code:
"create a folder called development inside your home directory."
This helps to keep all coding projects in one place.
Step 2: Create a GitHub Account
Go to github.com and create an account if you do not already have one. GitHub is where your project will be stored online.
Step 3: Create a Private Repository
Once logged in:
- Click New Repository
- Enter a name for your project
- Select Private
- Click Create Repository
Private repositories prevent your code from being publicly visible.
Step 4: Install Git on Your Computer
Tell Claude: "check if git is installed, if not then install"
Or manually — check if Git is installed:
git --version
If you see a version number, you are good. If not:
Mac:
xcode-select --install
Linux:
sudo apt install git
Windows: Download from git-scm.com
Step 5: Clone Your Repository
Copy the repository URL from GitHub. It will look like:
https://github.com/username/demo-repo.git
Make sure you are in the development folder:
cd ~/development
Clone the repository:
git clone REPOSITORY_URL
Move into the project folder:
cd demo-repo
Step 6: Confirm Git Is Working
Run:
git status
You should see:
On branch main
No commits yet
nothing to commit (create/copy files and use "git add" to track)
Step 7: Start Claude
Start Claude by entering:
claude
Before building anything, add a .gitignore file to prevent sensitive files from being uploaded to GitHub. Simply ask:
"Create a .gitignore file appropriate for this project."
Workflow: Starting a New Feature
Branch names must be one connected word — no spaces. Examples: version-1, user-login, add-blog-section.
- Confirm you are on main:
git status
You should see: On branch main
- Create a new branch:
git checkout -b feature-name
Workflow: Saving Changes
After Claude modifies your project:
- Check changes:
git status - Add the changes:
git add -A - Commit them:
git commit -m "describe change" - Push to GitHub:
git push
The first push may show a command like:
git push --set-upstream origin branch-name
Just copy and run it once.
Workflow: Merging Your Work
Once your feature is complete:
- Go to your repository on GitHub.
- Select the branch you worked on.
- Click Compare & Pull Request
- Add a short description. You can ask Claude to summarize the changes.
- Click Merge Pull Request — GitHub will merge your feature into the main project.
Final Step: Update Your Local Code
Return to your terminal, switch to main, and pull the updated version:
git checkout main
git pull
Now your local project matches the merged version online.
Why This Matters
Understanding this workflow helps you:
- Track every change in your project
- Recover if something breaks
- Collaborate with others later
- Build more complex systems with confidence
Even though you will most likely use Claude to control your GitHub repository, walking through this process once will make you a much stronger builder.
Basic Git Commands List
These are the only commands you need for a simple workflow. Run these in a separate terminal window (Shell → New Window), not where Claude is running.
cd development/your-project-name
Exit a running program
Ctrl + C
Check project status
git status
Create a new branch
git checkout -b branch-name
Add changes
git add -A
Commit changes
git commit -m "describe what you changed"
Push changes to GitHub
git push
Switch back to main branch
git checkout main
Pull the latest version from GitHub
git pull