Software configuration management
Clear, exam-focused study notes on Software Configuration Management (SCM): definitions, principles, important commands, worked examples, common mistakes and likely exam questions.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Software Configuration Management (SCM) is used by engineers to control versions of source code, track changes, coordinate team work, and reproduce past builds or releases. Good SCM reduces integration problems, enables repeatable builds and audits, and is essential for CI/CD, release management and safe maintenance.
Key ideas
Start from basic terms (define before use):
- Software Configuration Management (SCM) — the set of activities, practices and tools that record and control changes to software so that the system's integrity and traceability are maintained throughout its lifecycle.
- Configuration item (CI) — any artifact under SCM control (source file, binary, document, test data).
- Repository — the storage (local or remote) where the history of configuration items is kept.
- Working copy — the developer's local files checked out from the repository to edit.
- Version (or revision) — a recorded state of a configuration item at a point in time.
- Baseline — a formally reviewed and agreed snapshot of a set of configuration items that serves as a reference for further development; it is assumed stable until the next baseline.
- Commit — an atomic recorded change to one or more configuration items; it creates a new version in the repository.
- Branch — an independent line of development that diverges from the main line to allow parallel work.
- Merge — the operation that integrates changes from one branch into another.
- Tag — a named pointer to a specific version (often used for releases).
- Merge conflict — when two changes cannot be automatically merged and require human resolution.
- Atomic commit — the principle that a commit must apply entirely or not at all (no partial commits recorded).
- Lock-modify-unlock — a concurrency control model where one developer locks a file to edit; the file is unlocked after commit (contrasts with optimistic merging used by distributed VCS).
- Continuous Integration (CI) — the practice of frequently integrating changes and running automated builds/tests to detect integration problems early.
Principles and laws (as used in exams):
- Versioning principle: Every change that must be reproducible must be recorded in the SCM. Assumption: all build inputs are CIs or can be derived from them.
- Baseline rule: A baseline is immutable; further changes create derivatives and new baselines. Assumption: the team agrees on the baseline before use.
- Atomicity of commits: For consistency, commits must be atomic. Assumption: the SCM supports atomic commits or the team ensures logical atomicity.
What to draw (diagrams examiners ask for):
- Repository model diagram: Draw a central repository box labelled "repository"; draw developer machines with arrows from the repository to the machines for
checkout/clone/fetch/pull, and arrows from machines to the repository forpush. - Branch diagram: Draw a timeline line for
main(master) and a forked line forfeaturewith commits as dots (label commit hashes or numbers). Show a merge arrow from feature back into main and a tag symbol at a merge commit for a release.
Assumptions made: team size small-to-medium, networked repository, use of distributed VCS (Git) unless explicitly using centralized VCS (SVN/Perforce) where lock-modify-unlock may apply. Also know core SCM activities (commonly asked in exams): configuration identification (define and label CIs and baselines); change control (submit/evaluate/approve via CCB); configuration status accounting (record and report change states and versions); configuration auditing (FCA/PCA to verify conformance); build and release management (repeatable builds, versioned releases); workspace management and traceability.
Formulas
For SCM a list of syntax and short commands to remember (each on its own line):
git init — create a new Git repository in the current directory.
git clone <url> — copy a remote repository to a local machine.
git status — show changed files in the working directory.
git add <file> — stage file for next commit.
git commit -m "message" — create a new commit (record staged changes) with message.
git branch — list branches; git branch <name> — create a branch.
git checkout <branch> — switch to branch; git checkout -b <name> — create and switch to new branch.
git merge <branch> — merge changes from <branch> into current branch.
git pull — fetch from remote and merge into current branch.
git fetch — download commits/refs from remote without merging (review before integrating).
git push — send local commits to remote repository.
git tag -a v1.2.3 -m "message" — create an annotated tag named v1.2.3.
git log --oneline --graph --decorate — view compact commit history with branches and tags.
git diff <from> <to> — show differences between two commits; git diff <commit> — compare working tree with <commit>; git diff — compare working tree/index with HEAD.
git revert <commit> — create a new commit that undoes the effect of <commit>.
git reset --hard <commit> — move current branch pointer to <commit> and reset working tree (dangerous, rewrites history locally).
git stash — save working changes temporarily; git stash pop — restore.
When to use which: use git revert for public history undo (safe), git reset --hard only for local branches not pushed.
Worked examples
Example 1 — Branch, change, merge, conflict resolved (trace):
Context: single text file hello.txt initially contains line: Hello.
Steps (commands and trace):
git init(create repo). Commit 0:hello.txt= "Hello".git add hello.txtthengit commit -m "initial".git checkout -b feature(create branch feature at commit 0).- On
feature, edithello.txtto: Hello From featuregit add hello.txtthengit commit -m "feature: add line". Commit F1. git checkout main(if your default branch is named master, usegit checkout master; this branch still has only "Hello").- On
main, edithello.txtto: Hello From maingit add hello.txtthengit commit -m "main: add line". Commit M1. Now merge
From featurefeatureintomain:git merge feature. Result: Git detects both changed the same file at the same location; a merge conflict occurs. The working file contains conflict markers like: Hello <<<<<<< HEAD From mainfeature
- Resolve by editing to desired content, for example:
Hello
From main
From feature
Then
git add hello.txtandgit commit -m "merge feature: combine lines". Final commit contains both lines. Final: main branch now contains merged content with a merge commit. This trace shows branching, parallel changes, conflict markers and manual resolution.
Example 2 — Semantic versioning and tagging (release example): Definition: Semantic Versioning (SemVer) is a convention: MAJOR.MINOR.PATCH where:
- Increment MAJOR for incompatible API changes,
- Increment MINOR for added functionality in a backwards-compatible manner,
- Increment PATCH for backwards-compatible bug fixes.
Scenario: Current release
v1.4.2. A feature is added that is backwards-compatible. After tests and CI green, perform:
- Merge feature into
mainand create a release commit. git tag -a v1.5.0 -m "Release v1.5.0: add feature X".git push origin main --tagsto publish the tag. This records the baseline for the releasev1.5.0.
Worked example answers follow logical steps, show commands, and note when CI builds/tests should run (after push or merge request).
Common mistakes
- Force-pushing (
git push --force) to shared branches and rewriting public history (causes lost work for others). - Using
git reset --hardon branches that were pushed (rewrites history, confuses collaborators). - Not pulling before pushing, causing rejected pushes and accidental overwrites.
- Using long-lived feature branches without frequent merges to main (causes big, conflict-heavy merges).
- Ignoring merge conflicts or resolving them incorrectly (forgetting to include both sides' intent).
- Not tagging releases or missing build inputs/lockfiles in SCM, or failing to archive build artifacts in an artifact repository (difficult to reproduce a released binary).
For your exam
Kinds of questions:
- Definitions: define SCM, baseline, branch, merge, tag, semantic versioning.
- Short notes: compare centralized vs distributed VCS, describe branching strategies (feature-branch, GitFlow, trunk-based), advantages of CI with SCM.
- Diagrams: draw repository model, branch timelines and label commits, show merge and tag.
- Long/derivation-style: explain how SCM supports repeatable builds and traceability; show steps to recover a previous release.
- Commands/programs: write the sequence of Git commands to create a branch, make a change, commit, push and create a tag.
- Problem-solving: given conflicting change texts, show how to resolve and produce final merged content.
- Activities/baselines: list and explain configuration identification, change control, configuration status accounting, configuration audits (FCA/PCA), and types of baselines (functional, allocated, product).
What a full-marks answer includes:
- Clear definitions with bolded terms, assumptions stated.
- A small diagram or commit timeline where asked (label branches, tag, commits).
- Correct sequence of commands with reasons (e.g.,
git checkout -b,git add,git commit,git push). - Notes about safety (use
git revertfor public undo, avoid force-pushes) and CI integration points.
Quick check
- What is a baseline? 2) Give the Git command to create and switch to a new branch named
bugfix. 3) When should you usegit revertinstead ofgit reset --hard? Answers: A baseline is a formally reviewed, agreed snapshot of configuration items used as a reference.git checkout -b bugfix. Usegit revertto undo a public commit safely (create a new commit that undoes changes); usegit reset --hardonly for local, unpublished commits.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?