Course → 1 · DevOps foundations → Git & version control
1 · DevOps foundations
Theory · Git & version control
16 min · Module 3 · Theory
How to study this topic
- Read the theory below (concepts, bullets, and shell/YAML examples).
- Try the Exam pool and Book quizzes in this module.
- After each quiz, use Show answer on every question to review.
Git & version control
Git tracks every change. Trunk-based or GitFlow branching strategies support CI/CD. Pull requests enable review, tests, and audit trails before merge.
- Commits: atomic, meaningful messages — reference tickets.
- Branches: short-lived feature branches merge to main via PR.
- Merge vs rebase: rebase keeps linear history; merge preserves branch topology.
- Tags: mark releases (v1.2.0) consumed by deploy pipelines.
Shell, YAML & config examples
git checkout -b feature/add-healthcheck
git add src/
git commit -m "feat: add /healthz endpoint"
git push -u origin feature/add-healthcheck
# Open PR → CI runs → merge to main → tag v1.3.0
Hands-on practice: /lab/