A
A
Alexander Wolf2013-07-07 14:04:00
git
Alexander Wolf, 2013-07-07 14:04:00

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

4 answer(s)
V
Vyacheslav Plisko, 2013-07-07
@mannaro

git-flow habrahabr.ru/post/147260/
it's very easy, you can google more videos.

D
deleted-mifki, 2013-07-07
@deleted-mifki

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.

N
Nazar Mokrinsky, 2013-07-07
@nazarpc

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.

D
DancingOnWater, 2013-07-07
@DancingOnWater

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 question

Ask a Question

731 491 924 answers to any question