KatalockAi AcademyBack to KatalockAi

Git & Collaboration

Version control is not optional. Every experiment, every model, every lesson you build here gets tracked.

On the Software Engineering Fundamentals skill path

Learn 30 min
Learn this with Professor KatalockOpens in KatalockAi chat: your AI engineering mentor teaches this lesson step by step, checks your understanding and reviews your code.

Learning Objectives

  • Configure git identity and use the daily workflow of add, commit, and push
  • Create and merge branches for isolated experiments without breaking main
  • Write a .gitignore that excludes model checkpoints and large binary files
  • Navigate the commit history with git log to understand project evolution

The Problem

You're about to write hundreds of code files across 20 phases. Without version control you will lose work, break things you can't undo, and have no way to collaborate with others.

Git is the tool. GitHub is where the code lives. This lesson covers what you need for this course and nothing more.

The Concept

Diagram
Crafting the diagram layout…

Three things to remember:

  1. Save often (git commit)
  2. Push to remote (git push)
  3. Branch for experiments (git checkout -b experiment)
s0-commit-dag

Build It

Step 1: Configure git

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Step 2: The daily workflow

git status
git add file.py
git commit -m "Add perceptron implementation"
git push origin main

Step 3: Branching for experiments

git checkout -b experiment/new-optimizer

# ... make changes, commit ...

git checkout main
git merge experiment/new-optimizer

Step 4: Working with this course repo

You can't push to the course repo itself — only maintainers have write access. Fork it on GitHub first (the Fork button, top right) so origin points at your own copy:

git clone https://github.com/YOUR-USERNAME/katalock-ai-engineering.git
cd katalock-ai-engineering

git checkout -b my-progress
# work through lessons, commit your code
git push origin my-progress

Use It

For this course, you need exactly these commands:

CommandWhen
git cloneGet the course repo
git add + git commitSave your work
git pushBack it up to GitHub
git checkout -bTry something without breaking main
git log --onelineSee what you've done

That's it. You don't need rebase, cherry-pick, or submodules for this course.

Exercises

  1. Fork this repo, clone your fork, create a branch called my-progress, make a file, commit it, push it
  2. Create a .gitignore that excludes model checkpoint files (.pt, .pth, .safetensors)
  3. Look at the commit history of this repo with git log --oneline and read how lessons were added

Key Terms

TermWhat people sayWhat it actually means
Commit"Saving"A snapshot of your entire project at a point in time
Branch"A copy"A pointer to a commit that moves forward as you work
Merge"Combining code"Taking changes from one branch and applying them to another
Remote"The cloud"A copy of your repo hosted somewhere else (GitHub, GitLab)

Lesson check

Answer a few questions on this lesson to mark it as done. You need 70% to pass and can retry as often as you like.

Pass the lesson check above to mark this lesson as done.