BSE Tutorial Series — #1

Git & GitHub

Everything you need to know about version control — explained for Business Solution Engineers, not developers.

Chapter 1

Why Does a BSE Need Git?

You're not becoming a developer. You're becoming a Business Solution Engineer — someone who understands customer intent, shapes context, and evaluates AI-built solutions. But here's the thing: those solutions live in code, and code lives in Git.

Think of it this way: Git is like Google Docs for code. Multiple people can work on the same project, you can see every change ever made, and you can always go back to a previous version. GitHub is where those "documents" are stored and shared online.

The BSE Workflow

As a BSE, your job follows a clear pattern:

1. Intent — Understand what the customer actually needs (not just what they say)
2. Context — Gather and shape the problem context for the AI agent
3. Evaluation — Build evaluation methods so the AI's solution can be automatically validated
4. Agent Builds → Git Tracks — The AI agent (Claude Code, Cursor, Codex) writes the code, and Git records every step

You don't need to write code. You need to navigate, review, and manage the code that AI writes. That's why Git matters.

Real-World Scenario

A client asks for a payment workflow change

The AI agent builds the solution in a Git branch. You review the changes, confirm they match the client's intent, and approve the merge. Without Git literacy, you're blind to what changed — and that's how things break.

What Git Lets You Do

Quick Check: Why is Git important for a BSE?
BSEs need to write code from scratch
BSEs need to review and manage code that AI agents write
Git is only for senior developers
GitHub is a social media platform
Chapter 2

Core Concepts

Git vs GitHub

Git is the "Track Changes" feature — it runs on your computer and records every edit.
GitHub is "OneDrive/Google Drive" — it stores your project in the cloud so teams can collaborate.

You can use Git completely offline. GitHub is where you share and collaborate. They work together, but they're not the same thing.

Key Terms (Plain English)

Repository ("repo")
A project folder with superpowers. It stores all your files and remembers every change ever made. Like a filing cabinet that never forgets.
Commit
A snapshot of your project at a moment in time. Like pressing "Save" but with a note about what changed. Each commit has a message like "Add payment form" or "Fix header bug."
Branch
A parallel version of your project. Like making a photocopy of a document to experiment on — the original stays safe. When your experiment works, you merge it back.
Pull Request (PR)
A proposal to merge changes from one branch into another. It's a review step — someone (or you) checks the changes before they go live. Like sending a doc for approval before publishing.
Clone
Downloading a complete copy of a GitHub project to your computer. Like downloading a shared Google Doc to work offline.
Fork
Creating your own copy of someone else's project on GitHub. Like duplicating a Google Doc into your own Drive — you can modify freely without affecting the original.

Match the Term

Drag each Git term to its matching definition:

Commit
Branch
Repository
Pull Request
Drop here
A project folder that tracks every change
Drop here
A saved snapshot with a description of what changed
Drop here
A parallel copy for safe experimentation
Drop here
A review step before merging changes
What's the difference between Git and GitHub?
They're the same thing
Git tracks changes locally; GitHub hosts projects in the cloud
GitHub is the free version of Git
Git only works with GitHub
Chapter 3

The Git Workflow

Every change in Git follows a simple flow. Click each step to learn more:

📝
Edit
Change your files
📦
Stage
Pick what to save
💾
Commit
Save a snapshot
☁️
Push
Share to GitHub
Restaurant analogy: You prepare ingredients (edit), plate the dish (stage), take a photo for the menu (commit), and post it to Instagram (push). Each step is intentional.

Why Not Just Save Directly?

The staging step might seem unnecessary, but it gives you control. Imagine you changed 10 files but only want to save 3 of them right now. Staging lets you choose exactly what goes into each commit.

This is especially useful when an AI tool generates many changes at once — you might want to commit the bug fix now but hold off on the new feature until you've reviewed it.

The Commands

StepCommandWhat It Does
Check statusgit statusSee what's changed
Stagegit add .Stage all changed files
Commitgit commit -m "message"Save snapshot with a note
Pushgit pushSend commits to GitHub
What's the correct order of the Git workflow?
Commit → Stage → Push → Edit
Push → Commit → Edit → Stage
Edit → Stage → Commit → Push
Stage → Edit → Push → Commit
Chapter 4

Try It Yourself

This is a simulated terminal. Type the commands below to walk through a real Git workflow. Don't worry — you can't break anything here!

Git Simulator — BSE Project
Welcome to the Git simulator! Let's set up a new project.
Type the commands below to practice. Try: git init
$
💡 Hint: Start with git init to initialize a repository

Commands to Try (In Order)

  1. git init — Initialize a new repository
  2. git status — Check the current state
  3. git add . — Stage all files
  4. git commit -m "First commit" — Save a snapshot
  5. git log — View commit history
  6. git checkout -b feature — Create a new branch
  7. git branch — List all branches
  8. git push — Push to GitHub
Deep Dive: What does git init actually do?

When you run git init, Git creates a hidden folder called .git inside your project directory. This folder contains the entire history database for your project — every commit, every branch, every change.

You never need to look inside .git directly, but knowing it's there helps explain why deleting that folder would erase all your project history (don't do that!).

Which command saves a snapshot of your staged changes?
git add .
git commit -m "message"
git push
git status
Chapter 5

Branches & Pull Requests

Branch = a separate draft. Imagine writing a proposal. Instead of editing the final version, you make a copy, try some changes, and only replace the original when you're happy. That's branching.

Why Branches Matter for BSEs

When an AI agent builds a solution for a client, it should work in a branch — never directly on the main (production) code. This way:

The Branch Lifecycle

1. Create a branch → git checkout -b my-feature

2. Work on it (make changes, commit) → git add . && git commit -m "..."

3. Push to GitHub → git push origin my-feature

4. Open a Pull Request on GitHub (review step)

5. Merge into main after approval

Pull Requests: The Review Gate

A Pull Request (PR) is where the magic happens for BSEs. It's a side-by-side view of everything that changed. Green lines = additions. Red lines = deletions. You can:

BSE Scenario

Client wants a new onboarding workflow

You define the intent and context. The AI agent creates branch feature/new-onboarding and builds the solution. You open the Pull Request, see the AI added 3 new files and modified 2 existing ones. You check the changes match the client's requirements, approve, and merge. The production site updates automatically.

Deep Dive: What are merge conflicts?

A merge conflict happens when two branches change the same part of the same file differently. Git doesn't know which version to keep, so it asks you to choose.

Think of it like two people editing the same sentence in a Google Doc at the same time — someone has to decide which version wins.

In practice, Git marks the conflicting sections clearly:

<<<<<<< HEAD
Your version of the line
=======
The other branch's version
>>>>>>> feature-branch

You pick which to keep (or combine them), remove the markers, and commit. Most code editors highlight these visually to make it easy.

When should AI agents make changes directly to the main branch?
Always — it's faster
When the change is small
Rarely or never — use branches and PRs for review
Only on Fridays
Chapter 6

Git + AI Coding Tools

This is the reason BSEs need Git. AI coding tools are transforming how solutions get built — and Git is the backbone they all rely on.

The AI Tools BSEs Work With

Claude Code (Anthropic)
A command-line AI coding agent. It reads your project, understands context, and writes code directly. It creates commits, branches, and PRs — all in Git. As a BSE, you provide the intent and context; Claude Code does the building.
Cursor
An AI-powered code editor. It uses Git to track all changes. You can see exactly what the AI modified, accept or reject changes per-file, and commit when ready.
Codex / ChatGPT Code Interpreter
OpenAI's coding tools. When connected to a GitHub repo, they can read context, suggest changes, and create PRs.
GitHub Copilot
Lives inside your code editor and suggests code as you type (or as the AI agent works). All suggestions get tracked through Git.

The BSE ↔ AI ↔ Git Loop

  1. You define Intent — "The client needs an expense report that auto-categorizes receipts"
  2. You shape Context — client requirements, existing codebase, constraints
  3. You set Evaluation criteria — "Must handle PDF and JPG receipts, categorize into 5 expense types"
  4. AI Agent builds — Works in a Git branch, makes commits as it goes
  5. You review via PR — Check the diff, run evaluations, approve or request changes

Without Git, this loop doesn't work. You'd have no way to track what the AI changed, review its work, or safely revert if something goes wrong.

GitHub Issues & Projects

Beyond code, GitHub has built-in project management tools that BSEs use daily:

BSE Scenario

Managing an AI-built solution end to end

You create a GitHub Issue: "Client needs automated invoice matching." You add context and evaluation criteria in the issue description. The AI agent picks up the issue, creates a branch feature/invoice-matching, and works through the solution. When done, it opens a PR linked to the issue. You review, approve, merge — and the issue auto-closes. Full traceability from request to delivery.

How do AI coding tools like Claude Code relate to Git?
They replace Git entirely
They can only work without version control
They use Git to track, commit, and share the code they write
Git is only needed for manual coding
Chapter 7

Advanced Topics

These topics go beyond the basics. You don't need to master them now, but knowing they exist will help you navigate real projects.

.gitignore — What NOT to Track

Not every file should be in Git. A .gitignore file tells Git which files to skip. Common things to ignore:

A .gitignore file looks like this:

.env
node_modules/
dist/
.DS_Store
*.log

GitHub Desktop — The Visual Way

If the command line feels intimidating, GitHub Desktop does everything through a visual interface. You click buttons instead of typing commands. It's 100% legitimate — many professionals use it daily.

GitHub Desktop gives you:

Download free at desktop.github.com

GitHub Pages — Free Website Hosting

GitHub can turn any repository into a live website for free. Perfect for:

Just go to your repo's Settings → Pages → select your branch → your site goes live at yourusername.github.io/repo-name.

Static vs Dynamic Sites

Static (GitHub Pages)
Landing pages, docs, portfolios. Same content for everyone. Free hosting.
Dynamic (Vercel, Railway)
Apps with logins, databases, real-time features. Needs a server. Usually costs money.
Deep Dive: Common Git Mistakes (and How to Avoid Them)
  • Editing main directly — Always use branches. Main should only change through approved PRs.
  • Vague commit messages — "Fixed stuff" tells nobody anything. Write "Fix payment calculation rounding error" instead.
  • Giant pull requests — Smaller PRs are easier to review. Break big changes into focused steps.
  • No README — Every repo needs one. It's the instruction manual for your project.
  • Committing secrets — Never commit API keys or passwords. Use .gitignore and environment variables.
What should you NEVER commit to a Git repository?
HTML files
README documentation
API keys, passwords, and secrets
CSS stylesheets
Chapter 8

Quick Reference Cheatsheet

Bookmark this page. Come back to this section whenever you need a refresher.

Essential Commands

CommandWhat It Does
git initStart tracking a project with Git
git clone <url>Download a project from GitHub
git statusSee what's changed since last commit
git add .Stage all changes for commit
git add <file>Stage a specific file
git commit -m "msg"Save a snapshot with a message
git pushUpload commits to GitHub
git pullDownload latest changes from GitHub
git checkout -b <name>Create and switch to a new branch
git checkout mainSwitch back to the main branch
git branchList all branches
git merge <branch>Merge a branch into current branch
git logView commit history
git diffSee unstaged changes line by line

Glossary

TermPlain English
RepositoryProject folder that tracks all changes
CommitA saved snapshot with a note about what changed
BranchA parallel version for safe experimentation
Main / MasterThe primary branch — the "official" version
Pull Request (PR)A review step before merging changes
MergeCombining changes from one branch into another
CloneDownload a complete project from GitHub
ForkCreate your own copy of someone else's project
Push / PullUpload / download changes to/from GitHub
StagingSelecting which changes to include in the next commit
.gitignoreFile that lists what Git should NOT track
DiffA view showing exactly what changed between versions
Merge ConflictWhen two branches change the same thing differently

Your Next Steps

  1. Create a free GitHub account at github.com
  2. Download GitHub Desktop (or use the terminal — your choice)
  3. Create your first repository and add a README
  4. Make a change, commit it, and push
  5. Create a branch, make changes, and open a Pull Request

Complete these 5 steps and you've experienced the core workflow that powers every modern software project.

Tutorial Complete! 🎉

You've covered all 8 sections of the Git & GitHub tutorial. You're ready to start working with version control as a BSE.