Home/Glossary/Version Control

Version Control

A system that tracks changes to files over time, enabling collaboration, history tracking, and the ability to revert to previous states.

DevelopmentAlso called: "source control", "revision control", "git", "vcs"

Version control (also called source control or revision control) is fundamental to modern software development, enabling teams to work together without overwriting each other's changes.

Why it matters

  • Enables parallel development through branching and merging.
  • Provides complete history of who changed what, when, and why.
  • Allows safe experimentation—you can always revert to a working state.
  • Essential for code review, CI/CD pipelines, and audit trails.
  • Required for compliance in regulated industries (SOX, FDA 21 CFR Part 11).

Types of version control

  • Centralized (CVCS): Single server holds the repository (SVN, Perforce).
  • Distributed (DVCS): Every developer has full repository copy (Git, Mercurial).

Git fundamentals

  • Repository: The database containing all versions and history.
  • Commit: A snapshot of changes with a unique identifier (SHA hash).
  • Branch: An independent line of development.
  • Merge: Combining changes from different branches.
  • Pull request: Proposed changes for review before merging.
  • Tag: A named reference to a specific commit (usually for releases).

Best practices

  • Write clear, descriptive commit messages explaining why changes were made.
  • Commit often with small, focused changes.
  • Use branches for features, fixes, and experiments.
  • Review code before merging to main branch.
  • Never commit secrets, credentials, or sensitive data.
  • Use .gitignore to exclude build artifacts and dependencies.