Git usage in a professional environment
In this tutorial, we are going to see Branchng, Merge and Feature Branch workflow on git.
------------------ Branching ---------------------
Branching means you diverge from the main line of development and continue to do work without messing with that main line. In many VCS tools, this is a somewhat expensive process, often requiring you to create a new copy of your source code directory, which can take a long time for large projects.
We assume that you have several commits on your master branch as shown below.:
We will create another branch called feature1 and then make several commits as follows. :
We assume there are bugs in your web app. How can you fix these bugs without disrupting/canceling your current work on the feature1 branch?
----------------- Merge -------------------------------
We want merge these two branch : master and feature1.
---------------------------- Feature Branch workflow -----------------------
The Feature Branch Workflow is a step-by-step process using by Git and GitHub after using the Centralized Workflow.
We want to upload a new feature into GitHub. To do this, we will create a repository on GitHub and then push the new feature from the local environment to GitHub.
We assume that two engineers are working on the same project. In the end, they want to merge their work into the main branch, master.