1/37
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What is the main goal of team collaboration in DevOps?
To enable multiple developers to work in parallel efficiently, avoiding conflicts and maintaining code quality through shared workflows and communication.
Why are branches used in team projects?
To isolate work on new features or fixes without breaking the main branch.
What are protected branches?
Branches that restrict direct commits, requiring merge requests and approvals before integration.
Why are protected branches important?
They prevent accidental overwrites of production-ready code and enforce code review and CI/CD checks.
What does “keeping history clean” mean in Git collaboration?
Maintaining readable, linear, and well-documented commit history through consistent commit messages and merges.
What is the benefit of a branching strategy?
It allows teams to work on different features simultaneously while protecting stable code.
List common Git branching strategies.
Git Flow, GitHub Flow, and Trunk-Based Development.
Describe the Git Flow model.
Uses feature, develop, release, and hotfix branches to organize development and releases.
Describe the GitHub Flow model.
Lightweight; main branch is always deployable, new work is done in short-lived feature branches merged via pull requests.
Describe Trunk-Based Development.
All developers commit small, frequent changes directly or via short-lived branches to main, enabling continuous integration.
Why are merge requests (MRs) essential in collaboration?
They provide code review, discussion, and automated testing before code merges into protected branches.
What happens when a MR is approved and merged?
Changes are merged into the main branch, triggering the CI pipeline and potentially closing linked issues.
What are some benefits of code review?
Catches bugs early, spreads knowledge across team, ensures standards, and supports mentoring.
What should a good MR description include?
A summary of what changed, why, how it was tested, and links to related issues.
What is a best practice for writing commits?
Use clear, meaningful messages following the Conventional Commit format.
What is the Conventional Commit format?
type(scope): description
List common commit types.
feat (feature), fix (bug fix), docs (documentation), style (formatting), refactor (structure), test (tests), chore (maintenance).
Why use Conventional Commits?
They make history readable, support changelog automation, and ensure consistent commit formatting.
What is an atomic commit?
A commit that contains one logical, self-contained change.
Why should commits be atomic?
To simplify debugging, make rollbacks easier, and keep the history meaningful.
What are common anti-patterns in commits?
Mixing unrelated changes, incomplete features, and commits that break the build.
Why should teams avoid large commits?
Large commits are harder to review, increase risk of conflicts, and reduce traceability.
What are feature flags used for?
To toggle features on/off without deploying new code.
What is environment management in Git workflows?
Using different branches or configurations for development, staging, and production environments.
Describe the “Branch-Based Environment” strategy.
Separate branches (develop → staging → main) represent environments; code is promoted by merging.
Describe the “Configuration-Based Environment” strategy.
Same codebase is deployed to multiple environments using environment variables or configuration files.
What are environment variables?
Key-value pairs that store environment-specific settings such as API keys or database URLs.
Why should environment variables be used?
To avoid hardcoding secrets or configuration values in code.
What are Git Hooks and what are they used for?
Scripts that run automatically at specific Git events (e.g., pre-commit, pre-push) for tasks like linting or testing.
Give examples of Git Hooks.
pre-commit (runs before commit), commit-msg (checks commit message), pre-push (runs before pushing changes).
Why is communication critical in DevOps teams?
It prevents redundant work, resolves blockers early, and ensures alignment on priorities.
How do Git repository hosting platforms support collaboration?
They offer features like issue tracking, merge requests, access controls, and integrated CI/CD pipelines.
What is the role of access controls in GitLab?
They define who can read, write, and approve code changes to maintain security and integrity.
Why is GitLab favored for DevOps workflows?
It integrates code hosting, CI/CD, issue tracking, and deployment automation in one platform.
What are the best practices for avoiding merge conflicts?
Pull often, rebase regularly, keep branches short-lived, and communicate with teammates.
How does Git support CI/CD?
Every commit can trigger automated builds, tests, and deployments through integrated pipelines.
Why is collaboration vital to DevOps success?
It ensures continuous integration, faster feedback, and shared responsibility for software quality.