๐ŸŒฟ
๐Ÿ“ Version Control with Git ยท GIT-101 ยท Assignments

Version Control with Git โ€” Assignments

Work each problem yourself first, then open the worked solution to check your thinking. This is where the course sticks.

๐Ÿ“ 5 problemsโœ๏ธ Worked solutions
Problem 1

Explain, in your own words, what problem version control solves.

Show worked solution

A strong answer contrasts the 'file_final_v3' mess with a clean tracked history, and captures the deeper benefit - fearlessness to experiment because every version is saved and recoverable - not just backup.

Problem 2

Describe the init -> add -> commit loop and what a commit actually is.

Show worked solution

Good answers describe starting a repo (init), staging chosen changes (add), and saving a labelled snapshot (commit), and explain that a commit is a snapshot of the whole project at a moment, with a message saying what changed and why.

Problem 3

Give an example of using history/undo to recover from a mistake.

Show worked solution

Strong answers show reading history (log/diff) and an appropriate safe undo - restoring a file, unstaging, or reverting a bad commit - and note that because commits are saved, you can return to a known-good state.

Problem 4

Explain why you'd use a branch, and what merging (and a merge conflict) is.

Show worked solution

Good answers explain branches as safe parallel work that leaves main untouched, merging as combining a finished branch back, and a merge conflict as Git asking you to choose when two branches changed the same line - routine, not a disaster.

Problem 5

List three good Git habits and explain why each matters (include secrets).

Show worked solution

Strong answers include small/frequent/clear commits (a readable, useful history), .gitignore (keep clutter/dependencies out), and never committing secrets (they persist in history even if deleted - gitignore keys/passwords), with the reasoning for each.

More in this course

Course home → · Browse all courses →