Part 1: Git Basics

Recording your work, and combining it with everyone else’s.

Why version control?

_images/p1-versioning-problem.svg

What git actually stores

_images/p1-commit-chain.svg

Two copies, one history

_images/p1-local-remote.svg

Branches keep work separate

_images/p1-branch.svg

The core workflow

_images/p1-cycle.svg

1. Update local

_images/p1-strip-1.svg

Start from what everyone else already has.

In PyCharm: branch indicator (bottom right) → main → Checkout, then Git → Pull.

2. Create a branch

_images/p1-strip-2.svg

Never work directly on main.

In PyCharm: branch indicator → New Branch → name it after the job, e.g. document-thumbnail-cmd.

3. Add commits

_images/p1-strip-3.svg

Small and focused beats big and vague.

In PyCharm: new files prompt “should Git track this file?” → Add. Write the message in the commit dialog.

4. Push the branch

_images/p1-strip-4.svg

Your commits only exist on your laptop until you push.

In PyCharm: Git → Push.

5. Open a merge request

_images/p1-strip-5.svg

Ask for your branch to go into main — with a description of what and why.

6. Discussion

_images/p1-strip-6.svg

A second pair of eyes. Today, that pair is yours.

7. Merge

_images/p1-strip-7.svg

Your commits are now part of main. Everyone else gets them on their next update.

That’s the whole workflow

_images/p1-cycle.svg

Over to you

Generate a practice package, put it on GitLab, and run the cycle for real — five times.

Part 1 tasks →