This question already has an answer here:
I am authoring a LaTeX document with a co-author. The document is a single, monolithic one. We are working on two separate copies of the same document. Once one of us is done with his section, we are merging it together and updating out local copies. It has become a headache. Is there a better way to collaborate authoring LaTeX document?