0

When there are conflicts in the merge, does git merge the rest of the files with no conflicts? For example, there are 10 different files to be merged, 5 files merge successfully and the 6th fails. Do the remaining 4 files merge as well?

I'm asking because a merge failed, I resolved the conflicts, committed the resolve and then noticed one file wasn't changed on the master branch. It stayed the way it was before the merge. I imagine git does merge all the other files and only tells me which had conflicts but I haven't found anything that mentions this explicitly and I don't want to make any assumptions.

Is there something extra I'm not doing after the merge fails? Does resolving the conflicts and committing fix everything or do I have to try the merge again afterwards?

Vic
  • 2,655
  • 3
  • 18
  • 28

2 Answers2

0

iirc, git only merges all files if it resolves. if there are no changes to be made, then it isn't going to be changed. it might also help to make sure that the branch you were working on was up to date with its commits.

DTSCode
  • 1,062
  • 9
  • 24
  • well, in the example I gave, assume the 10 files I mentioned changed so they _all_ have to be changed. If there is an error, would some files be left unchanged even though they _should_ change? – Vic Jul 18 '14 at 18:28
  • ah sorry i misunderstood. ill run a test real quick – DTSCode Jul 18 '14 at 18:29
0

Yes, git automatically merges the files it can, while pointing out the conflicts in the files which have them asking you to manually resolve them.

gravetii
  • 9,273
  • 9
  • 56
  • 75