[TOC]
CI/CD stands for continuous integration and continuous deployment (or continuous delivery) and is an essential practice in modern software development. It focuses on automating and streamlining the process of integrating code changes, testing, and deploying software.
Continuous Integration(CI) means developers frequently merge small code changes into a shared repository instead of doing large merges later.
Types Of CI Tests:
- Unit Tests
- Integration Tests
Each push automatically triggers:
- Application build
- Automated tests(unit + integration)
- Massive conflicts
- Hidden bugs
- Long debugging cycle
Continuous Delivery(CD) extends continuous integration by automating everything needed to prepare code for production release. Where CI stops after building & testing, CD starts and moves the validated artifact through preproduction environments.
After CI passes, the pipeline automatically deploys the build to:
- Testing environment
- Staging environment
- Ensure there is always a production-ready build that has passed all automated checks.
- Enable releases at any time with confidence and stability.
Continuous Deployment(CD) is the highest level of automation in the CI/CD pipeline. It takes Continuous Delivery one step further by removing the final manual approval and automatically deploying every validated change straight to production.
A code change passes all automated checks in:
- CI(build + unit test + integration tests)
- CD(E2E tests, performance tests, security tests)
- Source
- Build
- Test
- Deploy
- Complexity of Pipeline Configuration
- Integration Issues
- Slow Build/Test Execution
- Maintaining Pipeline Reliability
- Security Concerns
- Scaling Challenges
- Lack of Testing Coverage
Git has two layers:
- Porcelain (user-facing commands): add, commit, checkout, rebase, etc.
- Plumbing (low-level building blocks): hash-object, cat-file, read-tree, update-index, and more.
When you trigger a Git command:
- Your porcelain command is translated by Git
- It calls lower-level plumbing operations
- Plumbing writes directly into the .git directory (Git’s entire internal database)
Inside the .git directory: Git stores everything it needs to reconstruct your repo.
objects/: all file content and metadata stored by hashrefs/: branches and tagsindex: staging areaconfig: repo configurationHEAD: current branch pointer
The .git folder is your repository. If you delete it, the project loses its entire history.
Everything in Git is built from just four objects:
blob: file contentstree: directoriescommit: metadata + parentstag: annotated reference
Git Reset moves your current git branch (HEAD) to a different commit and can make the index and working directory match it.
| Git Fetch | Git Pull |
|---|---|
| Used to fetch all changes from the remote repository to the local repository without merging into the current working directory | Brings the copy of all the changes from a remote repository and merges them into the current working directory |
Repository data is updated in the .git directory |
The working directory is updated directly |
| Review of commits and changes can be done | Updates the changes to the local repository immediately |
| Git Merge | Git Rebase |
|---|---|
| Git Merge merges two branches to create a "feature" branch. | Git Rebase rebases the feature branch to add the feature branch to the main branch. |
| Git Merge is comparatively easy. | Git Rebase is comparatively harder. |
| Git Merge safeguards history. | Git Rebase doesn't safeguard history. |
| Git Merge is more suitable for projects with the less active main branch. | Git Rebase is suitable for projects with frequently active main branches. |
TODO
[1] CI/CD Pipeline - System Design
[2] DevOps Interview Questions and Answers




