Introduction to Version Control System
Basics and workflow of version control system
Version control is a system that records changes to a file or set of files over time so that we can access specific versions later
In software development, Version Control Systems (VCS) allows developers to manage changes to their code and track who made each change
Depending on the role, you could be working with a small team of 2 or 3 developers in a single project or a large team spanning multiple projects. In either scenario, Version Control will be a crucial tool to help your team succeed.
Important roles of version control we need to remember are :
It keeps track of changes
Provides access to history
Reverse and roll back
Workflow of Version Control:
Using Version Control without a proper workflow is like building a city without traffic lights; without appropriate management, everything will turn into chaos.
Continuous Integration
Note : Integration problems in software development refer to issues that arise when combining different pieces of code or components within a system. These problems can occur when individual developers or development teams work on separate parts of a project, and their contributions need to be integrated into a unified codebase.
CI automates the merging of code changes from multiple developers into a shared mainstream. Frequent integration of small changes minimizes merge conflicts. It's integral to test-driven development, automatically compiling and testing code changes to ensure a stable build and prevent functional regressions.
Key points to know about CI :
CI automatically combines code changes from different developers into a shared codebase, keeping everyone's contributions integrated regularly.
CI encourages often blending small code changes into the main code to minimize conflicts between developers' work.
Regular small integrations in CI help spot and solve conflicts early, making conflict resolution simpler.
CI, linked with TDD (Test-Driven Development), involves writing tests before code. These tests are automatically run with each integration to ensure new changes don't break existing functionality.
CI systems automatically compile the entire project after each code change, catching compilation errors early in the process.
CI systems run various tests (unit, integration, etc.) on integrated changes to verify that the new code behaves as expected and doesn't introduce issues.
CI's main goal is to maintain a stable build. If issues arise, such as failing tests, the system alerts developers immediately for prompt resolution.
CI prevents new code changes from unintentionally breaking existing features by continuously testing and validating the entire codebase.
Continuous Delivery
Continuous Delivery is an extension of Continuous Integration. Once the changes have been merged into the mainstream, a Continuous Delivery system automatically packages the application and prepares it for deployment. This helps avoid human error when packaging the application.
CD builds upon Continuous Integration (CI) practices. After code changes are automatically integrated through CI, CD takes over to streamline the application delivery process.
CD involves automatically packaging the application after changes have been merged. This packaging process includes assembling all the necessary files and resources for the application to run.
The automation in CD significantly reduces the chance of human errors during the packaging phase. Automated processes ensure consistency and accuracy in creating application packages.
The primary objective of CD is to prepare the application for deployment. This includes not only packaging but also ensuring that the application is in a state where it can be seamlessly and reliably deployed.
CD contributes to establishing a consistent and reliable delivery pipeline. The automated packaging and preparation for deployment create a streamlined and standardized process for delivering applications.
Continuous Deployment
Continuous Deployment is an extension of Continuous Delivery. The goal of Continuous Deployment is to deploy and release software to customers frequently and safely. The strategy commonly involves automatically deploying to a test (also known as staging) environment first to validate the deployment package and software changes. Once validated, it can automatically deploy to the live (also known as production) environment for customers.