More in DevOps & Cloud — page 58
Monorepo vs. Polyrepo: One Repository or Many?
A monorepo is one repository for all projects, like a city; a polyrepo is one per project, like separate towns. Monorepos simplify code sharing and atomic refactors but require complex tooling. Polyrepos offer autonomy but can create dependency hell.
Git Cherry-Pick: Copy a Commit to Another Branch
Think of `git cherry-pick` as copying a single commit's changes from one branch and reapplying them as a new commit on another. It's for backporting a bug fix without merging an entire feature branch.

GitFlow: A Branching Model for Versioned Releases
GitFlow organizes your repo around two main branches: `master` for production and `develop` for integration. It's designed for projects with distinct, numbered releases, like desktop apps, not for continuously delivered web apps where simpler models are…

GitHub Flow: A Simple, Branch-Based Workflow
GitHub Flow is a simple workflow where `main` is always stable and new work happens on a feature branch. It's used for continuous delivery, from code to documentation.
Git Rebase: Rewriting History for a Cleaner Timeline
Git rebase rewrites history by transplanting your commits onto a new base, creating a clean, linear project history instead of a merge bubble. It's used to catch a feature branch up with `main`. Never rebase a branch others are using; it rewrites history.
Git Merge: Combining Development Histories
Git merge combines separate lines of development into one branch. It creates a special merge commit that ties the two histories together, preserving the context of each. Use it to integrate a feature branch into your main line.

Pull Requests: A Structured Conversation About Code
A Pull Request (PR) is a structured conversation about a proposed code change. It's used in team projects to review new features and fixes, ensuring quality and sharing knowledge. The footgun is treating PRs as a rubber-stamp approval instead of a real review.
Git Branch: A Lightweight Pointer, Not a Full Copy
A Git branch is a lightweight pointer to a commit, not a heavy copy of your code. This makes creating and switching branches nearly instant. Use them to isolate new features or bug fixes. The footgun is forgetting a branch is local until you push.
.gitignore: Telling Git What to Ignore
A .gitignore file is a deny-list for your repository, telling Git which files and directories to intentionally leave untracked. Use it to keep build artifacts, log files, and local configs out of your commit history.
Git Commit: A Snapshot, Not a Diff
A Git commit is a permanent snapshot of your entire project, not just the changes. It's a save point containing the full state of all files, linked to the previous commit to form a historical chain.
Distributed Version Control (DVCS): Everyone Gets a Copy
A DVCS gives every developer a full, independent copy of the repository, history and all. This is Git's model, making commits and branches instant because they're local. The footgun: your local copy isn't the team's truth until you push and pull to sync.
Idempotency: Safe to Retry Automation
Idempotent automation ensures an operation has the same effect whether run once or many times. This is vital for safely retrying failed CI/CD jobs or configuration scripts. The footgun: thinking it means 'no side effects'.

GitOps: Your Git Repo is the Single Source of Truth
GitOps makes a Git repo the single source of truth for your infrastructure's desired state. An automated process makes production match what's declared in Git, enabling continuous deployment.
Immutable Infrastructure: Treat Servers Like Cattle, Not Pets
Immutable infrastructure means you never modify running servers. To deploy, you replace them with new ones built from a golden image. This is key for CI/CD and autoscaling, ensuring consistency. The footgun is configuration drift from manual, one-off fixes.
Pipeline as Code: Versioning Your Build Process
Treat your CI/CD pipeline not as clicks in a UI, but as a version-controlled file (`Jenkinsfile`) living with your code. This enables automated, reviewable build processes for every branch. The footgun is defining pipelines in the UI, creating a black box.
Canary Release: Test New Code on Real Users, Safely
A canary release is like sending a canary into a coal mine: expose a new version to a small group of users to detect problems before a full rollout. It's used to safely test changes in production by gradually shifting traffic.

Blue-Green Deployment: Zero-Downtime Releases
Run two identical production environments, Blue (live) and Green (new). To deploy, just flip a switch routing traffic to Green. This enables zero-downtime releases and instant rollbacks. The footgun is using DNS for the switch, which can lag due to caching.
Infrastructure as Code: Manage Servers with Code, Not Clicks
Infrastructure as Code (IaC) treats servers and networks like software: defined in files and versioned in Git. It's used to automate cloud resource provisioning on AWS or GCP, ensuring consistent, repeatable environments.
Artifact Repository: Your CI/CD's Private Library
An artifact repository is your CI/CD's private library for build outputs like packages and images. CI pipelines publish artifacts here, and deployment scripts pull from it.
Automated Testing: Catch Bugs Before They Ship
Automated testing is like a robot QA engineer checking every code change instantly. It's the engine of CI/CD pipelines, running tests on every commit to give developers immediate feedback on business risks.