Git • GitHub • Version Control • Project Safety

Git is your project time machine.

Git is a tool that saves the history of your project. It lets you try new things, break code, compare changes, and roll back when something does not work.

GitHub is the website and developer community where people store, share, and collaborate on code. It can host public portfolio projects or private work-in-progress repos.

Simple version: Git lets you experiment without fear. GitHub lets you store and share the finished version when it is ready.
Try an idea Edit code, make files, change layouts, test commands
Commit a snapshot Save the working version with a message
Break safely Experiment, compare, branch, and roll back
Push to GitHub Store, share, collaborate, and build a portfolio
Version control changes the way you learn because mistakes stop being permanent.

Why Git is awesome

Before Git, a lot of people saved projects like this: final, final2, final-real, final-real-fixed. Git is the better version of that.

Rollback

When it breaks, go back

If a change ruins your project, Git can show what changed and help you return to an earlier working version.

Experiment

Try things without fear

New layout? New function? Different config? Try it on a branch. If it fails, throw it away.

Memory

It records your thinking

Good commit messages tell the story of how a project was built, fixed, cleaned up, and improved.

Git vs GitHub

These are related, but they are not the same thing.

Concept Plain English Why it matters
Git The version control tool on your computer or in Codespaces. Tracks changes, commits snapshots, creates branches, and lets you roll back.
GitHub A Microsoft-owned website and platform for storing and sharing Git repositories. Lets you back up code online, collaborate, use Codespaces, build portfolios, and share projects.
Repository A project folder with Git history. A repo can hold code, notes, images, configs, docs, assignments, and project files.
Commit A saved snapshot of your project. Each commit should represent one meaningful change.
Branch A separate line of work. Use branches to try new ideas without damaging the main version.
Push Upload your commits to GitHub. This backs up your work and lets other people see it if the repo is public.

How Git fits the LaunchShell method

Git is the tool that makes “try new things” safer.

01

Build it

Write code, create files, make configs, and get something working.

02

Back it up

Commit a working version before you make risky changes.

03

Break it safely

Use branches to test ideas without damaging the main version.

04

Rebuild better

Keep the good changes, throw away the bad ones, and document what happened.

The basic Git loop

Most beginner Git work follows the same pattern.

01

Check status

See what files changed before saving anything.

02

Add files

Choose which changes should go into the next snapshot.

03

Commit

Save a snapshot with a short message explaining the change.

04

Push

Upload the saved work to GitHub.

git status
git add .
git commit -m "Add first project page"
git push

The commands that change everything

These are enough to start using Git for class projects.

Command Plain English Use it when
git status Show what changed. Run this constantly. It tells you what Git sees.
git diff Show the actual line-by-line changes. Use before committing so you know what you are saving.
git add file Stage a file for the next commit. Use when you want to save a specific file.
git add . Stage everything in the current folder. Useful for simple beginner projects, but review with git status first.
git commit -m "message" Save a snapshot. Use after a meaningful change works.
git log --oneline Show commit history. Use to see your project timeline.
git switch -c experiment Create and switch to a new branch. Use before trying a risky idea.
git restore file Throw away unsaved changes to one file. Use when you changed a file and want the last committed version back.
git push Upload commits to GitHub. Use to back up your work online.
git pull Download the latest changes. Use before working if the GitHub copy may be newer.

Why GitHub matters

GitHub is not just storage. It is a public technical notebook, a collaboration tool, and a project portfolio.

Backup

Your code is not only on one laptop

If your computer dies, your GitHub repos can still hold the project history.

Portfolio

Show what you can actually build

A clean public repo can prove you can write code, document work, use Git, and finish projects.

Community

Learn from real projects

You can read open-source code, file issues, contribute fixes, and see how professional projects are organized.

Codespaces

Code without installing everything

GitHub Codespaces can give you a Linux-based coding environment in the browser.

Class workflow

One repo per class

Create repos for Java, Python, C++, databases, and web projects so every class has a clean workspace.

Documentation

READMEs explain your work

A good README can turn a pile of code into a project someone else can understand.

Related guide: New to browser-based coding? Read the GitHub Codespaces Guide.

Public vs private repos

This rule keeps things simple.

Private

Keep work in progress private

Use private repos while you are still figuring things out, doing class assignments, storing rough notes, or working with files that might contain sensitive information.

  • Class assignments: usually private unless the instructor says otherwise.
  • Rough projects: private until cleaned up.
  • Anything with config files: private until secrets are removed.
Public

Share finished portfolio projects

Make a repo public when it is cleaned, documented, and safe to show. Public projects can help with resumes, internships, clubs, and interviews.

  • README: explain what the project does.
  • Screenshots: show the result.
  • No secrets: remove keys, passwords, tokens, and personal data.
Important: If you accidentally commit a password, API key, SSH private key, database URL, personal address, or real server secret, deleting the line in a later commit is not enough. Git history may still contain it. Treat leaked secrets as compromised and rotate them.

What not to put on GitHub

GitHub is useful, but it is very easy to accidentally publish things you should not publish.

Secrets

No keys, passwords, or tokens

Do not commit .env files, API keys, SSH private keys, database passwords, or cloud credentials.

Class rules

Be careful with assignments

Some instructors do not want assignment solutions public. Keep coursework private unless sharing is allowed.

Personal data

Sanitize before sharing

Remove real IP addresses, usernames, emails, customer data, private notes, logs, and screenshots with sensitive info.

# Example .gitignore entries
.env
*.pem
*.key
secrets/
config.local.json
__pycache__/
.venv/
node_modules/

My class workflow

This is a practical student workflow.

Goal: set up one GitHub repo and Codespace for every class that gives code files.

  • Create a repo for Java, Python, C++, database, web, or networking code.
  • Open a Codespace for that repo during class.
  • Use the built-in Linux terminal to run code and practice commands.
  • Commit working changes after each class or project milestone.
  • Push changes so the repo is backed up.
  • Keep class repos private unless the instructor says public sharing is okay.

First Git lab

This is the smallest useful Git practice lab.

Goal: create a tiny project, commit it, break it, and restore it.

  1. Create a new folder called git-practice.
  2. Run git init.
  3. Create a file called notes.txt.
  4. Add one sentence and commit it.
  5. Edit the file and intentionally mess it up.
  6. Run git diff to see the damage.
  7. Run git restore notes.txt to roll back the uncommitted change.
mkdir git-practice
cd git-practice
git init

echo "Git lets me save project history." > notes.txt
git status
git add notes.txt
git commit -m "Add first note"

echo "broken change" >> notes.txt
git diff
git restore notes.txt
cat notes.txt
New to the terminal? Start with the Linux Terminal Intro Guide before running these commands.

Better commit messages

A commit message should say what changed. It does not need to be fancy.

Weak

Messages that do not help later

  • update
  • stuff
  • fixed things
  • asdf
Better

Messages that explain the project history

  • Add login page
  • Fix broken image paths
  • Create seed tray JSON template
  • Update README with setup steps

When Git can change your life

Git is not just for professional software developers. It changes how you work.

01

You stop being afraid

Trying something new is less scary when rollback exists.

02

You become organized

Every class, project, and experiment can have a clean history.

03

You build proof

A good public repo shows real skill better than just saying you know something.

Friendly resources

These are the official and beginner-friendly links I would keep nearby.

GitHub basics

GitHub Git guide

GitHub’s beginner explanation of Git, history, commits, and collaboration.

Read GitHub’s Git guide

Repositories

About GitHub repos

Official GitHub page explaining repositories and public/private visibility.

Read about repositories

Practice

GitHub Skills

Hands-on GitHub practice courses for issues, pull requests, pages, and more.

Open GitHub Skills

Browser coding

Codespaces guide

Use GitHub Codespaces to practice Git and terminal commands without installing a compiler.

Read the Codespaces guide

Final idea

Git makes experimentation safer. GitHub makes finished work easier to store, share, and show. Keep rough work private, sanitize before publishing, and use public repos as proof that you can build real things.