Skip to contentSkip to conversation

git merge

DISCUSSION Fabien Dubail 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

I've conflicts when I merge branches. I can resolve some conflicts but not all. The remaining conflicts will be solved by someone else? To do that I would like to merge only some files and resolve 'my' conflicts. (something like: 'git checkout branch files' but with merge) Than remaining files will be merged by someone else and remaining conflicts will be resolved .
Is-it possible to do that with git and how? Or is there an other way?

Thanks

Fabien

#1 lore raw
Quoted 9 lines · Fabien Dubail

I've conflicts when I merge branches. I can resolve some conflicts but not all. The remaining conflicts will be solved by someone else? To do that I would like to merge only some files and resolve 'my' conflicts. (something like: 'git checkout branch files' but with merge) Than remaining files will be merged by someone else and remaining conflicts will be resolved .
Is-it possible to do that with git and how? Or is there an other way?

One way you can do it is to create a branch containing your resolutions.
Then the other person pulls your branch. They would redo the merge on
their own branch and checkout your resolutions to apply your work, and resolve the remainder himself. This could go on for mutltiple people. You can edit the merge commit message to document who resolved which conflicts.

Maybe someone has a better way. We did a "distributed merge" this way.
I pulled everyone else's branches containing their resolutions and
then redid the merge and checkout out their resolutions from their branches and resolved my portion assigned to me personally. Actually, I think I did mine in a separate branch and then when all were done I redid the merge and checked out out everyone's portions from their respective branches (including mine) to accomplish the distributed merge (merge conflict resolution). (In our case, we were actually doing git-rebase "merge", but I think it would work for git-merge also.)

Maybe someone else has a better way.

v/r,
neal

#2 lore raw
In reply to Fabien Dubail
Quoted 9 lines · Fabien Dubail

I've conflicts when I merge branches. I can resolve some conflicts but not all. The remaining conflicts will be solved by someone else? To do that I would like to merge only some files and resolve 'my' conflicts. (something like: 'git checkout branch files' but with merge) Than remaining files will be merged by someone else and remaining conflicts will be resolved .
Is-it possible to do that with git and how? Or is there an other way?

One way you can do it is to create a branch containing your resolutions.
Then the other person pulls your branch. They would redo the merge on
their own branch and checkout your resolutions to apply your work, and resolve the remainder himself. This could go on for mutltiple people. You can edit the merge commit message to document who resolved which conflicts.

Maybe someone has a better way. We did a "distributed merge" this way.
I pulled everyone else's branches containing their resolutions and
then redid the merge and checkout out their resolutions from their branches and resolved my portion assigned to me personally. Actually, I think I did mine in a separate branch and then when all were done I redid the merge and checked out out everyone's portions from their respective branches (including mine) to accomplish the distributed merge (merge conflict resolution). (In our case, we were actually doing git-rebase "merge", but I think it would work for git-merge also.)

Maybe someone else has a better way.

v/r,
neal