Back to the full dot-point answer

NSWSoftware EngineeringQuick questions

Module 4: Software Engineering Project

Quick questions on Version control with Git explained: HSC Software Engineering Module 4

13short Q&A pairs drawn directly from our worked dot-point answer. For full context and worked exam questions, read the parent dot-point page.

What is why version control?
Show answer
Git is by far the most common version control system. GitHub, GitLab and Bitbucket are hosted Git services.
What is the standard workflow?
Show answer
The feature-branch graph below shows how a branch diverges from main, accumulates commits, and is merged back. The merge commit on main has two parents.
What is commit messages?
Show answer
A good commit message explains the why, not just the what. Format:
What is merging strategies?
Show answer
When a pull request is merged, three options:
What is conflict resolution?
Show answer
When two branches change the same lines, Git cannot merge automatically. It marks the conflict in the file:
What is .gitignore?
Show answer
Some files should never be committed: build artefacts, secrets, IDE settings, node_modules. List patterns in .gitignore:
What is pull requests in detail?
Show answer
Only after all checks pass and reviews are approved can the PR merge. This is the gate that keeps main in a working state.
What is tags and releases?
Show answer
A tag marks a specific commit (typically a release):
What is worked example?
Show answer
Four developers work on the same code base.
What is force-pushing to main?
Show answer
The force push command rewrites history. On a shared branch like main, it destroys other people's work. Protect main from force-push.
What is one huge commit?
Show answer
Many small commits are easier to review, revert and bisect than one giant change.
What is vague commit messages?
Show answer
"fix bug" tells future you nothing. Explain the why.
What is long-lived feature branches?
Show answer
Branches that live for months drift far from main and create painful merges. Keep branches short (days, not months). :::

All Software EngineeringQ&A pages