5 Starting Commands for ATOC 4815/5815
CU Boulder ATOC
Spring 2026
If you’re thinking any of these:
You’re in good company.
By the end of today the goal is to be able to submit assignments with Git.
Git is a save system for your code.
Think of it like checkpoints in a video game:
In Summary: Git tracks changes to your files so you can go back in time if something breaks.
| Git | GitHub | |
|---|---|---|
| What | Tool on your computer | Website (github.com) |
| Does | Tracks changes to files | Hosts repositories online |
| Needs internet? | No | Yes |
Git is the time machine. GitHub is the cloud backup.
You can use Git without GitHub (just local saves). You can’t use GitHub without Git.
Today, you need exactly these 5 commands:
| # | Command | Plain English |
|---|---|---|
| 1 | git clone |
Download a project |
| 2 | git status |
What changed? (always safe!) |
| 3 | git add |
Pick files to save |
| 4 | git commit |
Save a snapshot |
| 5 | git push / git pull |
Upload / Download |
We’ll cover more commands next week.
You cannot permanently break anything today.
Why?
git status is 100% read-only. It never changes anything.git add and git commit only save things. They don’t delete.git push uploads your saves.The nuclear option always works:
If something goes wrong, this fixes it. Every time.
Warning: rm -rf permanently deletes files — no trash can, no undo. Always double-check you’re in the right folder first: run pwd and ls before deleting anything.
Check if Git is already installed:
If you see a version number (e.g., git version 2.39.0), you’re good!
If not installed:
| Platform | How to install |
|---|---|
| Mac | Open Terminal, type git. macOS will prompt you to install Xcode Command Line Tools. Click Install. |
| Windows | Download from git-scm.com. Use all default settings. This gives you Git Bash. |
| Linux | sudo apt install git (Ubuntu/Debian) or sudo dnf install git (Fedora) |
Mac users: If you already installed Homebrew, brew install git works too.
Tell Git who you are – this labels your saves with your name:
You need to connect your computer to GitHub so you can upload (push) your work.
The easy way – VS Code handles it for you:
git push or git pull, VS Code will pop up a browser windowWhat this looks like: A browser tab opens asking you to sign in to GitHub. You’ll see a page titled “Authorize Visual Studio Code.” Click the green Authorize button. The browser will say “You can close this tab” — done!
What about the terminal? Modern Git on Mac and Windows includes Git Credential Manager, which also opens a browser window automatically — same process, no token needed. If you’re asked for a “password” in the terminal, it means your Git is outdated — come to office hours and we’ll update it.
VS Code has a built-in terminal – this is where you’ll run Git commands.
Open it:
Ctrl+` (backtick key, below Escape)Cmd+`The terminal appears at the bottom of VS Code. It works exactly like a standalone terminal.
┌─────────────────────────────────────┐
│ VS Code Editor │
│ (your code here) │
│ │
├─────────────────────────────────────┤
│ TERMINAL │
│ $ git status │
│ On branch main │
│ nothing to commit, working tree │
│ clean │
└─────────────────────────────────────┘
Tip: Make sure the terminal is in your project folder! Check with pwd (Mac/Linux) or cd (Windows).
VS Code also has a visual Git interface – no terminal needed for basic operations.
Open it:
Ctrl+Shift+G (Cmd+Shift+G on Mac)What you’ll see:
git status)+ button next to a file – stages it (like git add)git commit)The visual workflow:
+ next to changed files... menu > Push to uploadUse whichever you prefer! Terminal commands and the Source Control panel do the same thing. This course teaches terminal commands because they work everywhere (servers, other editors, etc.).
Do this now :
Ctrl+`)git --versiongit config --global user.name "Your Name" (use your real name)git config --global user.email "you@colorado.edu" (use your CU email)git config --global user.name prints your nameDone? Give me a thumbs up.
Forking makes your own personal copy on GitHub that you have full permission to push to.
github.com/YOUR_USERNAME/atoc4815-git-practiceWhy fork? The original repo belongs to me. You can’t push to it. Your fork belongs to you, thus you can make changes!
git clone = Download Your ForkClone copies your fork from GitHub to your computer:
Replace YOUR_USERNAME with your actual GitHub username.
What just happened?
atoc4815-git-practiceDo this now:
Ctrl+`)cd ~/ATOC4815git clone https://github.com/YOUR_USERNAME/atoc4815-git-practice.gitcd atoc4815-git-practicels – you should see the files listed on the previous slideRaise your hand if you see the files. If not, let’s troubleshoot.
git status = Your Safety NetThis is the most important command. It is 100% safe. It never changes anything.
Run it all the time. Before you do anything. After you do anything. When you’re confused. When you’re not confused. Just run it.
Right now, it should say:
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
Translation: “Everything is saved. Nothing has changed.”
Open boulder_temperatures.py in your editor and add your name:
git status – Translation Table| Git says… | Translation |
|---|---|
nothing to commit, working tree clean |
Everything is saved. You’re good! |
Changes not staged for commit |
You changed files but haven’t told Git yet |
Changes to be committed |
Files are staged and ready to save |
Untracked files |
New files that Git doesn’t know about yet |
Your branch is ahead of 'origin/main' |
You saved locally but haven’t uploaded to GitHub |
Don’t memorize this. Just run git status and read the output. Git actually tells you what to do next!
Do this now:
git status – should say “clean”boulder_temperatures.py and add your name to STUDENT_NAMEgit status again – should say “modified: boulder_temperatures.py”See the change? That means Git is tracking your work.
Why two steps? Think of it like mailing a package:
Step 1: git add
Pack items into the box
Why not one step? Sometimes you change 5 files but only want to save 3 of them. git add lets you pick.
git add in DetailStage specific files:
After git add, run git status:
Changes to be committed:
modified: boulder_temperatures.py
Translation: “This file is packed in the box, ready to be saved.”
Heads up about git add .: This adds everything — including junk files like __pycache__/, .DS_Store, and temporary files. For now, add files by name. Next week we’ll learn .gitignore to handle this properly.
git commit in DetailSave a snapshot with a message:
The -m flag means “message.” The message goes in quotes.
After committing, run git status:
nothing to commit, working tree clean
Translation: “Everything is saved. You’re good!”
Good messages:
Short, describes what you did.
Rule of thumb: Start with a verb. What did you DO?
Add, Fix, Update, Complete, Remove, Implement…
Commit size rule: If your commit message needs more than one sentence, you probably waited too long to commit. Commit early. Commit often.
Every time you finish a chunk of work, do this:
The bookend git status calls are your safety net:
Status. Add. Commit. Status.
You will do this at least once:
nothing to commit, working tree clean
Do this now (you should already have your name in boulder_temperatures.py):
git status – see your modified filegit add boulder_temperatures.pygit status – file should now be “staged” (green)git commit -m "Add my name to boulder analysis"git status – should say “working tree clean”git log --oneline – see your save in the history!You just made your first commit! Run git log --oneline — you should see something like:
a1b2c3d Add my name to boulder analysis
f4e5d6c Initial commit
That’s your save history. Every commit you make shows up here.
You can also try git log --oneline --graph — even in simple projects, this shows how your saves build over time.
Git has two copies of your project:
Your Computer GitHub
(local) (remote)
┌──────────────┐ ┌──────────────┐
│ Your files │ git push │ Your files │
│ Your commits │ ────────────> │ Your commits │
│ │ │ │
│ │ git pull │ │
│ │ <──────────── │ │
└──────────────┘ └──────────────┘
git push = Upload your commits to GitHubgit pull = Download any updates from GitHubgit push = Upload to GitHubAfter committing, upload your work:
What happens:
If git push fails, it usually means you need to git pull first (someone else pushed changes). We’ll deal with that later – for now, you’re the only person working on this repo.
git pull = Download from GitHubIf you work on multiple computers, or if the I update something:
What happens:
Simple rule:
git pull when you SIT DOWN to workgit push when you STAND UP from workingDo this now:
git status (should be clean)git pushgit statusGo to your fork on GitHub in your browser:
github.com/YOUR_USERNAME/atoc4815-git-practice
Can you see your commit? (Look at the commit history – your fork is yours, so your push always works!)
Now let’s practice git pull — make a change on GitHub, then download it:
README.md and click the pencil icon (edit)Edited on GitHub by [your name]git pullREADME.md locally — your edit from GitHub is now on your laptop!That’s the full loop: push uploads, pull downloads. You’ll use git pull every time you sit down to work.
| Step | Command | When | Safe? |
|---|---|---|---|
| 0 | git clone <url> |
Once, to download the project | Yes |
| 1 | git status |
All the time! Before and after everything | 100% |
| 2 | git add <file> |
When you want to stage changes | Yes |
| 3 | git commit -m "msg" |
When you want to save a snapshot | Yes |
| 4 | git push |
When you want to upload to GitHub | Yes |
| 4 | git pull |
When you want to download from GitHub | Yes |
# Start of session
cd ~/ATOC4815/homework-3
git pull # Get any updates
# ... do your work in your editor ...
# When you finish a chunk
git status # What changed?
git add homework3_problem1.py # Stage it
git commit -m "Solve problem 1" # Save it
git status # Confirm
# ... do more work ...
git status
git add homework3_problem2.py
git commit -m "Solve problem 2"
git status
# End of session
git push # Upload everythingIf something goes horribly wrong:
# Step 1: Get out of the folder
cd ..
# Step 2: Rename (don't delete yet -- save your work!)
mv atoc4815-git-practice atoc4815-git-practice-broken
# Step 3: Clone your fork fresh
git clone https://github.com/YOUR_USERNAME/atoc4815-git-practice.git
# Step 4: Copy ALL your work back
cp atoc4815-git-practice-broken/*.py atoc4815-git-practice/
# Step 5: Add, commit, push in the fresh clone
cd atoc4815-git-practice
git add .
git commit -m "Re-add my work after fresh clone"
git pushThis always works.
Things that feel scary but are fine:
git status – just means “not staged yet”If you’re stuck, do this:
git statusRemember: you cannot break anything that can’t be fixed by cloning again.
This exercise is about practicing the Git workflow. The Python is straightforward — focus on the commands.
Open denver_wind_analysis.py and complete the three TODO functions. You already know how to do this (Week 1–2 Python).
The real exercise — commit after EACH function, not all at once:
# Function 1: average_wind_speed()
# ... write the code, test with: python denver_wind_analysis.py ...
git status
git add denver_wind_analysis.py
git commit -m "Implement average wind speed calculation"
# Function 2: count_advisory_days()
# ... write the code, test ...
git add denver_wind_analysis.py
git commit -m "Add advisory day counter"
# Function 3: windiest_day()
# ... write the code, test ...
git add denver_wind_analysis.py
git commit -m "Add windiest day finder"
# Upload all three commits at once
git pushCheck your history: git log --oneline — you should see 3 new commits, each describing one function. This is what “commit early, commit often” looks like.
After pushing, go to your fork on GitHub:
github.com/YOUR_USERNAME/atoc4815-git-practice
Bonus: Click on denver_wind_analysis.py on GitHub, then click Blame (right side). This shows who wrote each line and when. Imagine this with 5 collaborators — that’s why Git exists.
Today: 5 commands (clone, status, add, commit, push/pull)
Next time: The full Git toolkit
.gitignore – telling Git to skip certain files (then git add . becomes safe!)git logSee the full version: Git for Scientific Software Development
100% Safe (read-only):
These never change anything. Run them whenever you want.
When you’re stuck:
git status and read the outputUseful websites:
Git is a time machine for your research.
Every commit is a checkpoint.
Every push is a backup.
Every pull is synchronization.
You cannot break anything that cannot be fixed by cloning again.
That’s it (for today).
You now know enough to Git crazy.
Everything else is a bonus.
Questions?
Will Chapman | wchapman@colorado.edu | willychap.github.io
This week’s lab: Put your lorenz_project/ from Week 5.5 under version control on GitHub.
lorenz-project.gitignore (we’ll add our own)Now use the workflow you just learned — one commit per file:
git status # See all your untracked files
git add integrators.py
git commit -m "Add Euler integration functions"
git add lorenz63.py
git commit -m "Add Lorenz63 class with run and run_ensemble"
git add plotting.py
git commit -m "Add plotting utilities for attractor and ensemble"
git add run_lorenz_ensemble.py
git commit -m "Add driver script for 3-panel ensemble figure"
git push # Upload everything to GitHubVerify on GitHub: go to github.com/YOUR_USERNAME/lorenz-project — you should see your 4 files and 4 separate commits, each with a clear message.
If you have your ensemble figure from Week 5.5, add that too:
Check git log --oneline:
e5f6a7b Add 3-panel ensemble predictability figure
d4c3b2a Add driver script for 3-panel ensemble figure
c3b2a1f Add plotting utilities for attractor and ensemble
b2a1f0e Add Lorenz63 class with run and run_ensemble
a1f0e9d Add Euler integration functions
Five clean commits. Your Lorenz project now has a full history on GitHub.
Submit on Canvas:
github.com/YOUR_USERNAME/lorenz-projectGrading:
| Item | Points |
|---|---|
| Repo created and accessible on GitHub | 20% |
All 4 .py files committed separately (not one giant commit) |
40% |
| Clear, descriptive commit messages (start with a verb) | 20% |
| Figure committed and visible in repo | 10% |
git log --oneline screenshot shows clean history |
10% |
This repo is yours for the rest of the semester. Next week we’ll add a .gitignore, create branches, and learn to collaborate. Everything you build from here goes into this repo.

ATOC 4815/5815 Git Survival Guide