Making latex sourcefiles publicly available by default Question: where can I find (legal/pragmatic) information about having latex source files for scientific articles publicly available on github?
Or, how would you deal with it?

Problem description:

I like using git for collaborative tex'ing. So why not use it for scientific articles as well? Put up a github repo, collaborate, submit to arxiv while tagging the corresponding commit, incorporating reviewers suggestions, etc. Also, it comes at the additional benefit that not only a compiled preprint on arxiv is available but also your latex sourcefiles. This I think is desirable in terms of transparency and also others can easily reuse/extend complex latex bits you have in your articles.

Most publishers don't have a problem with arxiv preprints. But what about github repos? They don't contain the pdf, but in general, everyone would be able to compile the stuff from the source files on github. Would the source code on github then considered the same as the compiled preprint on arxiv?

I feel like the authors I know, that are using github, they might even just use github without thinking about the potential legal consequences (yes because it seems rather unlikely someone searches through the github repo). Also, if one knows upfront where the article might be submitted to, one can check the legal situation for that particular conference/journal. But sometimes one doesn't know beforehand, so one could end up having the latex source files publicly on the web, for a publication where this is not allowed?

I am looking for a pragmatic answer to this problem, as I think using github for scientific writing is just very efficient and good. Having the sourcefiles in addition to the compiled preprint available seems also desirable to me.
If you upload your papers to arXiv, then your Latex source is already publicly available there (click "other formats" and then "download source").  So the only difference is that the source would also be available on Github.

There is no legal issue with this unless you sign an agreement that forbids it.  In that case, the publisher could ask you to remove the manuscript from Github.