Use of Git in Modern Software Development

Git is fundamentals to the DevOps and Modern Software Development, Git Manages Small Changes with commits, it also supports simeltanous features development and stability through branches. Pull requests help us to improve the quality, pull request also includes reviews and automated testing.

Devops and Git Relation

DevOps

At its core DevOps means modern software development practics. DevOps Fundamental Principles.

  1. Conitnuously plan, build, and release small improvments to our project.

Continuous Improment

We is used to continuously improve our projects. conitinuous small changes to a project, or called small bactch sizes will make continuous improvments.

small batch sizes

Small batch sizes also applies to features of features of the product.

So the continuous improvments not only improve features/product but also remvoes bugs in small batch sizes.

How git helps?

As we established that modern products needs to be continuously immproved, we will learn how git help us in managing different versions of the product.

Git manage different versions of product my forming a project history. Each commit we do, is a different version of a project.

For Example commit X has 10 course now i added new course about git and commit the project, now the new version Y has 11 courses. Only small improvment to the project. This is what we meant by small batch sizes. The project version x and y only differs by one course. Git is very good at handling such kind of small changes.

Git is very efficient at managing different versions/commits. Collection of commits form history of project. At any time we can review the project history or revert changes by going bact to the previous version project.

Another example, lets say i added the feature of carousel on main page of website in commit A, and visitors did not like that, i can reverse these changes either going bact to the commit A or doing another commit in which i removed the carousel on main page.

now we understood how the git help us to make small continuous improvments to project.

Git Branches

Braches can be used to work independently without effecting the stable project. All the commits belongs to a branch, brach in a git could be understood as independent line of development of project. When we start using git, one branch automaticaly created called master branch. Our all previous commits X, Y, A were to the master branch.

For Example

One master branch could be used for stable releases of the product, carousel-branch could be used to develop and implement the feature of carousel another branch name widget-branch could be used to devlop the widget. These all branches are extension of master branch but master branch don’t know about these branches.

How Git Branches Works

For Example Commits A and B belongs to master branch and commit C belongs the new-features branch. For master branch there last commit was commit B, master branch does not know about the commit C. Although team has done additional work in new-features branch in commit C.

Merging Independent Branches with Pull Requests

First a feature is implemented in its own branch. After merge there is single brach called master which have latest feature. This request is made by developer when feature or bug fix has been done. During pull request team member can discuss or approve the changes. You can also require the automate test pass before the merge is allowed. if the pull request is accepted then that version of the project becomes the latest commit on master branch

Next