THE FUTURE MARKETACADEMY
Your classroomRoom 07 · Tech Lab
School of Data & Tech

Automation in the Terminal: Git, package managers and scheduled jobs

What you'll be able to do
  • Track your own files with Git from the terminal: snapshot, compare, undo safely, branch and share.
  • Install, update and remove tools with a package manager: Homebrew (Mac), winget (Windows) or apt (Ubuntu/Debian Linux).
  • Explain how SSH keys work, make a key pair safely and connect to a computer you are allowed to use.
  • Schedule a job with cron (Linux and Mac), and know when to use launchd (Mac) or Task Scheduler (Windows) instead.
  • Write automation that fails loudly, logs what it did, never deletes on its own and can be tested before it runs on a timer.
  • Build, test, schedule and restore an automated backup job.

Before this course: Command Line 2: files, search, pipes and scripts (course 7.11.2). You should already be able to use wildcards, find, grep, pipes, redirection, environment variables and PATH, and you have written a script with a preview mode. Every exercise here still happens in a practice folder with fake files.

How to read the OS labels: Mac/Linux means the Bash or zsh terminal; Windows means PowerShell unless it says Command Prompt. The Mac and Linux commands in this course were run and checked in a practice folder on macOS. The Windows commands come from Microsoft's documentation and were not run for this course, so read each one slowly and test it in a practice folder first.

Words in this course 34Open the Vocabulary Hall
01

Git from the terminal: snapshots for your files

In simple words

Git is like a photo album for a folder. Every time you are happy with your work, you take a photo (a commit). Later you can look back at any photo, see what changed, and go back if you made a mess.

Key facts
  • Before this course: Command Line 2 (course 7.11.2). You wrote scripts there. Git is how people keep every version of a script, a website or a set of notes without making copies like final-v2-REAL.txt.
  • git init creates an empty repository: a hidden .git folder inside your project. Git's manual says running git init again in an existing repository is safe; it does not overwrite what is there.
  • Tell Git who you are, once: git config --global user.name "Your Name" and git config --global user.email [email protected]. Per the Pro Git book, --global applies to every repository on your computer; leave it out inside one project to use a different identity there. git config --list shows your settings.
  • Files have states. Untracked: Git sees the file but does not keep it yet. Modified: a tracked file changed since the last commit. Staged: you marked the change with git add so it goes into the next commit.
  • git add means "add exactly this content to the next commit". If you edit the file again after git add, you must run git add again.
  • git commit -m "message" saves the snapshot. git log --oneline lists snapshots, newest first.
  • git status --short codes: ?? untracked, A added (staged), M modified. The left column is the staging area, the right column is your working folder.
  • A .gitignore file lists patterns Git should not track, such as .log or .env. Set it up early so you do not commit files you never wanted to share.
  • Git's first branch is called master unless your settings say otherwise; from Git 2.28 you can choose another name with git config --global init.defaultBranch main. Many tools now use main. Both work the same.
  • Never commit passwords, API keys or tokens. GitHub's guidance: if a secret was committed, revoke or rotate it first; removing it from history is not enough, because copies may exist in clones and forks.
OS differenceMacLinuxWindows
Is Git already there?Check; if missing, install it (for example with Homebrew, Lesson 3)Often; if not, install it with the package manager (Lesson 3)Usually not; git-scm.com lists winget install --id Git.Git -e --source winget (Lesson 3)
Checkgit --versiongit --versiongit --version
Step by step
  1. Run git --version. If you see a version number, Git is ready. If not, come back after Lesson 3.
  2. Set your name and email once with the two git config --global commands above. Check with git config --list.
  3. Make a practice project: mkdir notes-project then cd notes-project then git init.
  4. Create a file: echo "Shopping list" > notes.txt. Run git status --short: you see ?? notes.txt (untracked).
  5. Stage and commit: git add notes.txt then git commit -m "Add notes file".
  6. Change it: echo "apple" >> notes.txt, then git add notes.txt and git commit -m "Add apple". Run git log --oneline: two snapshots.
  7. Make a .gitignore: echo ".log" > .gitignore then echo ".env" >> .gitignore. Create debug.log and secrets.env. Run git status --short: only .gitignore shows up, the other two are hidden from Git. Commit .gitignore.
  8. Check: git log --oneline shows three commits, and git status says the working tree is clean.
Watch on YouTube
Git for beginners: command-line fundamentalsCorey Schafer · YouTube · youtube.com
A brief introduction to GitGitHub · YouTube · youtube.com

Videos by other creators on YouTube, for reference. They are not made by or affiliated with The Future Market.

LESSON 01Git from the terminal: snapshots for your files
LESSON 01 / ANIMATED LESSON / AI VOICE00:00 / 01:00
Read the video script
[Host] "Git is a photo album for a folder. Each photo is called a commit."
[Text on screen: git init | git add | git commit -m] "Start the album with git init. Choose what goes in the next photo with git add. Take the photo with git commit."
[Screen: git status --short showing ?? and M] "Two question marks means Git is not tracking the file yet. M means modified."
[Text on screen: .gitignore: .log .env] "A gitignore file keeps logs and secret files out of the album."
[Host] "Never commit a password. If you ever do, change the password first."
Try it now

In a new practice folder, make a Git repository with three files and at least four commits with clear messages (for example "Add budget table", not "stuff"). Add a .gitignore that hides .log and .env files and prove it works with git status --short. Write down what ??, A and M mean.

ClaudeStuck? Copy a ready-made prompt for Claude

Copy this, open Claude, paste it, and Claude will walk you through the lesson step by step.

For a grown-up: Claude is for adults (18+). Copy this, paste it into Claude, and use the answer to explain the lesson to your child.

I'm learning "Automation in the Terminal: Git, package managers and scheduled jobs" on The Future Market. Lesson 1: "Git from the terminal: snapshots for your files".

What the lesson teaches:
- Before this course: Command Line 2 (course 7.11.2). You wrote scripts there. Git is how people keep every version of a script, a website or a set of notes without making copies like final-v2-REAL.txt.
- git init creates an empty repository: a hidden .git folder inside your project. Git's manual says running git init again in an existing repository is safe; it does not overwrite what is there.
- Tell Git who you are, once: git config --global user.name "Your Name" and git config --global user.email [email protected]. Per the Pro Git book, --global applies to every repository on your computer; leave it out inside one project to use a different identity there. git config --list shows your settings.
- Files have states. Untracked: Git sees the file but does not keep it yet. Modified: a tracked file changed since the last commit. Staged: you marked the change with git add so it goes into the next commit.
- git add means "add exactly this content to the next commit". If you edit the file again after git add, you must run git add again.
- git commit -m "message" saves the snapshot. git log --oneline lists snapshots, newest first.
- git status --short codes: ?? untracked, A added (staged), M modified. The left column is the staging area, the right column is your working folder.

The exercise I'm working on:
In a new practice folder, make a Git repository with three files and at least four commits with clear messages (for example "Add budget table", not "stuff"). Add a .gitignore that hides .log and .env files and prove it works with git status --short. Write down what ??, A and M mean.

I'm stuck. Please:
1. Explain the main idea in plain, simple words with one everyday example.
2. Walk me through the exercise one small step at a time. Ask me what I've done so far before giving the next step.
3. Don't just give me the final answer. Help me do it myself, and check my work when I share it.
I'm a parent helping my child (about 8 years old) with a lesson called "Git from the terminal: snapshots for your files" from the course "Automation in the Terminal: Git, package managers and scheduled jobs".

Here's what the lesson says:
Git is like a photo album for a folder. Every time you are happy with your work, you take a photo (a commit). Later you can look back at any photo, see what changed, and go back if you made a mess.

The activity:
In a new practice folder, make a Git repository with three files and at least four commits with clear messages (for example "Add budget table", not "stuff"). Add a .gitignore that hides .log and .env files and prove it works with git status --short. Write down what ??, A and M mean.

Please explain this so an 8-year-old understands: short sentences, a fun everyday example, and no hard words.
Then give me 3 simple questions I can ask my child to check they understood, and a way to do the activity together, one tiny step at a time.
Open Claude
Sources
My notes
02

Git: compare, undo, branch and share

This lesson is part of full access: every course and every level for one payment.

03

Package managers: Homebrew, winget and apt

This lesson is part of full access: every course and every level for one payment.

04

SSH basics: keys and remote computers

This lesson is part of full access: every course and every level for one payment.

05

Scheduled jobs: cron, launchd and Task Scheduler

This lesson is part of full access: every course and every level for one payment.

06

Safe automation habits

This lesson is part of full access: every course and every level for one payment.

07

Build an automated backup job

This lesson is part of full access: every course and every level for one payment.

++

Final project

This lesson is part of full access: every course and every level for one payment.

??

Quiz

  1. What does git add do?

  2. What is the difference between git diff and git diff --staged?

  3. What should you do first if you accidentally commit a password?

  4. What does git switch -c try-idea do?

  5. Name the package manager usually used on Mac, on Windows, and on Ubuntu.

  6. Why read a package's details before installing it?

  7. Which SSH key file can you share?

  8. What do the five time fields of a crontab line mean?

  9. Why use full paths in a scheduled job?

  10. What does set -euo pipefail do?

  11. What does Apple recommend for timed jobs on a Mac?

  12. Why should a backup job never delete old backups by itself?

EX

Final exam

This lesson is part of full access: every course and every level for one payment.

CE

Certificate

This lesson is part of full access: every course and every level for one payment.