![]() After creating this file, two changes need to be made to add some more information to the same file and two people will make this change ġ - Each person then created a branch from main to work on their changes, these new branches were created more or less at the same time, that is, they have the same starting point Ģ - For some time each person works on their branch implementing their change, in this case, each person is adding the line “Person x was here.” in the README.md file where x is the person’s id ģ - Person 1 makes a pull request and has this pull request approved and also merged into main Ĥ - Person 2, on the other hand, makes the pull request to main, but this pull request cannot be merged because it has conflicts. It is worth mentioning that usually, during the project development cycle, changes are more significant and sometimes in greater quantity.Ġ - In our project we have a README.md that was added by the initial commit in the repository. ![]() It shows the steps until a conflict is formed. In the image below we have a diagram that I have affectionately nicknamed the “conflict anatomy”. The conflict symbolizes that two or more changes happened to the same chunk of a file and git doesn’t know which of the changes to keep. When more than one person changes the same piece of a file on different branches, that’s when conflicts appear. When a project has multiple people working at the same time, it’s possible that two people need to make changes to the same piece of a file. If you already know what conflicts are and just want to see the list of steps and commands to resolve a conflict, I suggest you skip to the conclusion by clicking here. In this article you will learn a foolproof step-by-step guide to resolving conflicts. Resolving conflicts can be an arduous and complicated task when it comes to git projects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |