![]() ![]() So the commits which may be present in master may not be present in stage-release or vice-versa. In any organisation, there are a lot of developers working on the same repo for different changes. There are many complexities we may have to handle while merging our code to it's origin branch. This is a basic diagram to show the flow of code while working on any front-end project. We will understand it better with the help of the following illustration. We also have a staged website which is a reduced version of our main website, and it is run by code from the stage-release branch, so initially, every developer has to merge into it, then it gets tested, and if there are any bugs, tickets are issued to developers, and after resolving all the bugs the new branch is approved to merge with master. Here comes the use of the second branch i.e. If we merge it directly to master then the wrong code can create too many bugs in our production website and then it will generate frustration among our users. We need to test the changes made by a developer. ![]() Then we make the necessary changes and merge it back, simple. If there is any feature change or any bug fix is scheduled, then we need to always create our local branch from master. ![]() Master is the main branch whose code is running live in production. Each repository has two important branches. Here at Halodoc we use Gitlab to maintain the codebase on the cloud. Our changes can be stored in the cloud and can also be fetched locally, where we can do development.This allows it to employ all the changes with minimal data. During merging, the merge tool only adds the changes to the origin branch and does not create a new branch.In development, it is termed the master branch. We can simply merge our branch with the added changes into the main or production branch.In the form of commits, Git contains all the documentation regarding the changes and the developer who made them.We can make our changes in local and deploy them for testing in another branch meant for it.A clone of our production website can be easily created, which is known as branching.Git is a software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. GIT provides a great documentation and storage space for our codebase, but we need to use this space efficiently without creating a mess with our branches and commits. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |