GDIATTA / git-tutorial-professional

Git usage in a professional environment
Apache License 2.0
1 stars 0 forks source link

git-tutorial-professional

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.:

Capture d’écran 2024-09-07 021302

We will create another branch called feature1 and then make several commits as follows. :

Capture d’écran 2024-09-07 022631

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?

Capture d’écran 2024-09-07 024043 Capture d’écran 2024-09-07 024109 Capture d’écran 2024-09-07 024539

----------------- Merge -------------------------------

We want merge these two branch : master and feature1.

Capture d’écran 2024-09-07 030605 Capture d’écran 2024-09-07 025831 Capture d’écran 2024-09-07 030010 Capture d’écran 2024-09-07 030122 Capture d’écran 2024-09-07 030721

---------------------------- Feature Branch workflow -----------------------
The Fea­ture Branch Work­flow is a step-by-step process using by Git and GitHub after using the Cen­tral­ized Work­flow.

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.

Capture d’écran 2024-09-07 030721 Capture d’écran 2024-09-07 120948 Capture d’écran 2024-09-07 123338 Capture d’écran 2024-09-07 123426 Capture d’écran 2024-09-07 124014 Capture d’écran 2024-09-07 124125

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.

Capture d’écran 2024-09-07 124621 Capture d’écran 2024-09-07 125219 Capture d’écran 2024-09-07 125249 Capture d’écran 2024-09-07 130144 Capture d’écran 2024-09-07 130401 Capture d’écran 2024-09-07 130427 Capture d’écran 2024-09-07 130454 Capture d’écran 2024-09-07 130533

Capture d’écran 2024-09-07 131426 Capture d’écran 2024-09-07 131600 Capture d’écran 2024-09-07 131632 Capture d’écran 2024-09-07 131735 Capture d’écran 2024-09-07 131828 Capture d’écran 2024-09-07 131854 Capture d’écran 2024-09-07 131941 Capture d’écran 2024-09-07 132000 Capture d’écran 2024-09-07 132046 Capture d’écran 2024-09-07 132133