Abstraction/library creators who collaborated with other people, how did you pull that off?

The easiest solution that comes to mind is to use folders shared with others via the cloud but that won't preserve history, working on branches and merging changes would be problematic. Basically you need to tell everybody "hold on, I'm working on a feature", you work on it (while everybody's waiting), then you synchronize your code with the cloud and other people can finally add other features on top using the same process. Not very convenient.

It'd be great to be able to use a version control system (like Git). However, even though *.pd files are basically text files, I doubt that any VCS will be able to merge them correctly. Also I don't know a good way to get a diff of changes (other than do a text diff and then try to compare, but dealing with new/deleted object connections can become a nightmare). So if there's a conflict (2 people modified same parts of the same files), you're in trouble.

I'd love to hear your ideas!