Understanding branch and merge
There are multiple approaches development teams use to keep everyone contributing code to the source control repository synchronized. Some common approaches include Feature Branching (Branch and Merge), Feature Flags (Trunk development), and GitFlow (Release branching). Regardless of choice, each approach involves the basic premise that there must be a way to isolate sets of changes from one another. This is done by creating Git branches.
Branches are a construct used to keep changes out of the primary code base until they have been tested and are ready for production. If you are unfamiliar with branches, this resource may be helpful: https://www.atlassian.com/git/tutorials/using-branches.
So, when we make changes to the code, we branch the code (git branch
) and make our changes. Our branch is like a copy of the main code base with our changes. We can update, add new features, or fix bugs on this branch, and then commit it to the repository server...