How to work with conflict management in the merge of branches?

2

I gave a quick study in git-flow, however, I did not identify how this works the issue of merge conflicts. In an article I read, the author mentioned each collaborator pulling the repository, managing conflicts, and then uploading their code.

How to proceed in this case?

    
asked by anonymous 12.03.2018 / 04:16

1 answer

1

After your commit, you will do Push and create the merge request, if there is a conflict:

  

Group that has a chief of architecture (or someone who manages the   project) this person will be responsible for resolving conflicts.

     

Group with independent developers, after merge request and exist   conflict, each developer needs to resolve conflicts individually.

Example:

First pull in the latest version of the master and then go back to your branch.

git merge origin Master

correct conflicts ...

 <<<<<<< HEAD
public void exemplo() {
}
=======
public void exemplo(string teste) { ...
}
>>>>>>> origin/<remotebranch>

You need to remove what will not be used.

This part comes from the Master:

<<<<<<< HEAD
 public void exemplo() {
 }
 =======

and this part comes from your branch

=======
public void exemplo(string teste) { ...
}
>>>>>>> origin/<remotebranch>

After editing, commit and push again.

    
12.03.2018 / 11:15