From zero to pushing your first code online. Everything you need, nothing you don't.
Before touching the terminal, understand what these words mean. It all clicks much faster.
main. Branches let you experiment safely.Every file goes through these four states before landing on GitHub.
Where you write and edit code. Git watches this folder but doesn't track changes until you say so.
A waiting room. Files here are ready to be committed. You can add or remove files before committing.
Staged files are saved as a permanent snapshot. This history lives on your computer.
Your commits are uploaded to GitHub. Now they're safe, backed up, and shareable.
Follow these steps in order. Each one builds on the last.
my-first-project)
https://github.com/yourusername/my-first-project.git. You'll need it in step 5.
cd command (change directory).git status before and after adding files — it shows exactly what Git sees in green (staged) vs red (not staged).
-u flag saves the destination so future pushes are just git push.Every command you'll actually use as a beginner.
Hit a wall? These are the most common beginner errors and how to fix them.
git pull origin main
git pushcd, then run git init if you haven't already.<<<<<<< markers, choose which version to keep, delete the markers, then run git add . and git commit.git add .
git commit -m "initial commit"
git push -u origin maingit pull to download and merge their changes before continuing your work.