Lesson 1 of 3 ยท 14 min

The Terminal & Git Basics

Navigate your computer from the command line and save your work with Git.

The terminal

Developers use the terminal every day. These commands cover 90% of it:

Command What it does
pwd print the folder you're in
ls list files
cd projects move into a folder (cd .. goes up)
mkdir my-app create a folder
touch index.html create a file (macOS/Linux)
code . open the folder in VS Code

Why Git?

Git records snapshots of your project over time. You can see what changed, undo mistakes, and work with other people without overwriting each other. Every software job uses it.

The everyday loop

git init                     # once per project
git status                   # what changed?
git add index.html           # stage a file (or: git add .)
git commit -m "Add homepage" # save a snapshot
git log --oneline            # history

Think of it as edit โ†’ stage โ†’ commit, many times a day, in small steps.

GitHub

GitHub hosts your repositories online. Connect a local repo once, then push:

git remote add origin https://github.com/you/my-app.git
git push -u origin main

Job tip: Your GitHub profile is part of your resume. Hiring managers look at it. Commit often, write clear messages, and pin your best projects.

Practice

Install Git on your computer and repeat the loop above with a real project folder. Then take the quiz.

โœ… Check your understanding

  1. What does git add do?

  2. Which command shows which files have changed?

  3. What's a good commit message?

  4. Where does git push send your commits?

Create a free account to track your progress.