Git Components ⚙️Part I
Blobs ⏹️ - immutable Git units that represent file 📂 contents.
Trees 🌲- structures the directory 🗃️ and points to other blobs and trees to create a directory hierarchy 📃.
Commits 🧑💻 - A commit points to a tree object that captures a snapshot of a repository by storing details (author, commit date, and previous commit info).
Tags 🏷️- acts as a unique identifier for a commit and stores a repository's milestones 🏆.
💫Which role does Git play in Continuous Integration?
⚙️Git is a distributed version control system to keep the project code 💻 and datasets 🗄️ up-to-date.
💻What is continuous integration?
Continuous integration is an iterative process where the developer commits to the repository 🗃️. The CI system tests and validates the commits so that they become integrated into the code project.
💻Integrating Git within the CI workflow 🔁
⚙️Git automates the build and testing phases using the following steps📄:
Select a CI tool 🔧 (Jenkins, CircleCI, Travis CI, or GitLab).
Set up a Git repository and push the code onto the server 📶.
Link up the Git repository with the chosen CI tool ⚙️.
⚙️Configure the CI server to watch the changes made to Git.
When detecting changes 🧑💻, the CI server will run an automated build script 💻.
The build script will execute a series of tests ✅❌.
An email 📨 notification will be sent to the development team after the automated continuous integration tests finish 🎯.
🧑💻A reviewer will determine whether to merge the code into the repository.
💡What should you do as a team member during the CI cycle?
✅Commit frequently to the repository 📶.
✅Create documentation 🗃️ of your changes to ensure consistency and allow the code to become reproducible for future developers 🧑💻.
✅Learn and understand the core CI principles 📖 and familiarize yourself with the tools ⚙️.
✅Keep in sync with the most recent updates from the repository 📶 to minimize the risks of a conflict.
✅Fix broken builds ⚒️ as soon as possible to allow other team members to integrate their changes and to keep the CI workflow cycle.
✅Schedule meetings 🗓️ with team members for code reviews 🗣️ and coordinate changes over essential components ⚙️.
✅Run local tests to fix ⚙️as many errors as possible before committing the code 💻.
✅Write meaningful commit messages 📖 to help other members 🧑💻 understand why you made this update ⚙️.