Answer the question
In order to leave comments, you need to log in
Branching, how?
Hello! Please tell me, here I have, for example, the project "Project". It contains one branch - master. And at one point I needed to add 2 functions "func1" and "func2". I create branches of the same name and develop the necessary functionality in them. Next, I need to merge. "Func1" will very successfully merge into master, but there will be problems with "func2". Can you tell me how to use branching correctly to avoid this kind of errors?
Answer the question
In order to leave comments, you need to log in
git-flow habrahabr.ru/post/147260/
it's very easy, you can google more videos.
Well, do you definitely need to develop two new features exactly at the same time, but in different branches? If so, then the consequences are appropriate.
What problems? The essence of the version control system is precisely to avoid such problems.
If the functions are in different files - there are no problems at all, if they are in one, and even intersect - the IDE should help you, for example, PhpStorm resolves conflict situations very well, and when it cannot do this, it shows three files. What was, new, and the result of merge, so you can compare and manually resolve conflicts by seeing both versions of the file.
Well, at one time I worked out the following recipes for myself:
Before creating two different branches, you need to figure out which entities the modernization will affect. If they intersect, it is better to create one branch.
This is if the changes are small.
If something large is planned, then it is better to have a separate branch for each such change. And yes, then you have to merge them with handles.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question