David Turner <David.Turner@xxxxxxxxxxxx> writes: > I could set my .gitattributes for the .gitmodules file to use a > custom merge driver. But: (a) I don't see an off-the-shelf one > that does what I want ("union" happens to work in the add/add > case, but not in the add/remove case or other cases) and (b) I > would have to rewrite my whole history in order to have the > .gitmodules file exist at every commit (or find a way to get > .git/info/attributes into each of my users' clones) and (c) this > should work correctly without customization; Git already treats > the .gitmodules file as special for commands like "status"; > there's no reason it shouldn't do so for merge and rebase. > ... if I did have time, do others agree that it would be > reasonable to special-case this file? (Naturally, before doing > the merge, we would check that the file was in fact parseable as a > git config file; merging two changed gitmodules files of which > either is unparseable would fall back to merging as text). I do not see a fundamental reason why Git shouldn't know what .gitmodules file is and how it should merge. Our philosophy has always been "give users enough flexibility so that they can experiment and come up with a solution that is general enough (i.e. you can do it with custom merge driver), and then fold it back into the core if it is an issue that is general enough and it makes sense for the core to care about (i.e. my "why not?" above). If you already have a custom merge driver, then you have already cleared the first step ;-)