AI-Assisted Programming for PhD Researchers
Helmut Schmidt University — September 2026
Pick the line for your system:
Your turn: confirm Git works, then tell it who you are.
Use the same email you will use on GitHub — it links your commits to your account.
Your turn: confirm uv is installed from setup.
Missed the setup step? This one command fixes it now:
Every lab runs Python through uv run — nothing else to configure.
.git directorygit init — start tracking a new folder of your owngit clone URL — copy an existing repository to your machineYour turn: get the starter project and look around.
The log output is the project’s history — every commit before you arrived.
git status: what have I changed?git add: put changes in the staging areagit commit: record what is staged, with a messageThe staging area is a shopping cart: you fill it deliberately, then check out.
Your turn: make your first commit in the starter repo.
Your commit is now the newest line in the history.
git add -p walks you through changes hunk by hunkgit log --oneline --graph — compact history with branch structuregit diff: changes you have not staged yetgit diff --staged: changes about to go into your next commitgit show HEAD: the full content of the last commitThis is the tool for reviewing what an agent actually did.
Your turn: read the starter repo’s history.
Scroll the log and find the commit where the data set was first added.
Match the command to how far you want to go back:
| Command | Undoes |
|---|---|
git restore <file> |
An unstaged change in your working file |
git restore --staged <file> |
Staging — keeps the edit, unstages it |
git reset --soft HEAD~1 |
The last commit — keeps its changes staged |
Your turn: break a file on purpose, then bring it back.
Nothing is scary while your last commit is safe.
Never rewrite history you have already pushed or shared — others may have built on it. Everything still local and unpushed is yours to rewrite freely.
main stays cleanmain never knewFour commands: branch, work, return, merge.
Your turn: run the full branch cycle once.
No shame in catching up — the goal is the next exercise, not pride.
git push sends your commits up; git pull brings others’ downLecture II — Version Control with Git | Dr. Tobias Vlćek | Home