Skip to content

Lab · DevOps: Git, Docker, Kubernetes and CI/CD

Lab: version a college fee-receipt config with Git

Labbeginner· about 1.5 hours· 5 steps

The brief

The accounts office of a college keeps its fee rules in a small config file that two clerks edit. You put it under Git, add a change on a feature branch, resolve a real merge conflict between two clerks' edits, undo a bad change safely with revert, and tag the first release.

Why it matters

Every DevOps job starts with Git: application code, Dockerfiles, pipelines and Terraform all live in repositories, and you will resolve conflicts and roll back changes weekly. Config files are where conflicts and bad edits hurt most, because a wrong number goes straight to production.

Skills you practise

  • git init, add and commit
  • branches with git switch
  • merge and merge conflicts
  • git revert
  • annotated tags
  • reading git log

You need

  • Git 2.28 or newer (git --version); on Windows use Git Bash
  • A terminal and a text editor

What you will have at the end

A fee-receipts repository whose history shows a merged feature branch, a resolved conflict, a revert and an annotated v1.0.0 tag, plus notes.txt with your commands.

How it is marked (rubric, 100 points)
History is rightEvery check passes: the merge commit, the resolved conflict, the revert and the annotated tag.45
Clear commitsShort messages in the imperative mood that say what changed, one change per commit.20
Safe practiceYou used revert, not reset, on main, and checked git status before every commit.20
Explainednotes.txt says when you would use merge, revert and an annotated tag at work.15

0/5 steps done

Step 1 of 5

Start the repository

A repository on branch main has one commit, "Add fee rules", and a clean working tree.

Make a folder called fee-receipts, create fees.conf in it with the text from the fees.conf tab, and start a repository with git init -b main (the -b names the first branch main). Tell Git who you are with git config user.name and user.email; every commit records them.

git add puts the file in the staging area, and git commit saves a snapshot with a message. git status --short prints nothing when everything is committed.

Run this on your machine, then paste the output below
$ git branch --show-current; git log --oneline; git status --short
Your notes: notes.txt

Write down each command you ran. It goes into your project summary.