News for hackers. Stuff that matters.
Re:Two dozen mathematicians wrote a 600 page book in 6 month... by acadien on Thursday June 20, 2013 @04:24PM (#5914704)
Honest question: what is the advantage of Git over something like Dropbox or remote centralized storage accessed via ssh? The only possible answer I can think of is you get a revision history, but this doesn't seem terribly useful.

If you could provide a use case to demonstrate how Git+latex is a winner, I'd genuinely appreciate it!

Edit: As soon as I submitted this it occurred to me that for collaborative editing Git is the obvious choice.

Re:Two dozen mathematicians wrote a 600 page book in 6 month... by cocoflunchy on Thursday June 20, 2013 @04:28PM (#5914737)
I think the most important difference is conflict resolution. If you modify a file on DropBox and save it while someone else still has it opened, you're going to end up with two files, one named youFileName (conflicted copy of someone 06/20/13).tex and the original. Not only does Git allow you to see and fix the conflicts when you merge, it does it automatically most of the time, which is a huge advantage.
Re:Two dozen mathematicians wrote a 600 page book in 6 month... by mjn on Thursday June 20, 2013 @04:56PM (#5914909)
I haven't found git to work much differently in practice, at least with papers (I haven't written a book in it). You will end up with way too many conflicts unless you basically "lock" sections through either a software mechanism or agreement, because edits often touch or reorder many paragraphs. A copyediting/wording pass will typically touch every paragraph, for example, and these are more frequent in writing than refactoring or variable-renaming passes are in coding.

You can somewhat improve the situation if you adopt a somewhat weird source-formatting policy, where you write each sentence on one separate long-ish line, rather than flowing by paragraph. Then you will be able to automatically merge as long as nobody has made an edit or move that touches the same sentence, giving you better merge granularity. But even then conflicts happen pretty often, and few people like this style of formatting (maybe it'd work better with tool support).

For a book this might work better, though, because I assume you'd be making less frequent edits, and people would less often be working at the same time.

Re:Two dozen mathematicians wrote a 600 page book in 6 month... by jessriedel on Thursday June 20, 2013 @05:15PM (#5915032)
Note that in principle it's probably better to change your diff software to recognize sentences than to change how you write your latex.
Re:Two dozen mathematicians wrote a 600 page book in 6 month... by nickzoic on Saturday June 22, 2013 @04:17AM (#5922936)
Sure, but in practice, starting each sentence on a new line isn't difficult and works great with standard 'diff'. I actually quite like it for proofreading, since fragments and run-on sentences jump out at you.
Re:Two dozen mathematicians wrote a 600 page book in 6 month... by dbaupp on Thursday June 20, 2013 @09:33PM (#5915988)
> You will end up with way too many conflicts unless you basically "lock" sections through either a software mechanism or agreement, because edits often touch or reorder many paragraphs. A copyediting/wording pass will typically touch every paragraph, for example, and these are more frequent in writing than refactoring or variable-renaming passes are in coding.

As stated above, Dropbox doesn't even try to merge files, but Git does, which is definitely an advantage (at the very least, it tells you where the conflicts are, which is far more reliable than trying to work out the conflicts by hand, or with a separate diffing tool).

Re:Two dozen mathematicians wrote a 600 page book in 6 month... by csense on Thursday June 20, 2013 @05:36PM (#5915131)
Review: If you get into the habit of git diff --cached before every commit, it's a good way to review new changes before they go in, and you don't have to re-read the whole section -- you can just read your changes.

Merges: Git does all the bookkeeping for collaboration -- if you have two people making changes, it's much easier to merge them with VCS. Or an independent contributor can use rebase to, as the manual page succinctly puts it, "forward-port local commits to the updated upstream head."

Discussion: If you use a Web-based product like Github or Gitlab (an open-source, self-hostable GitHub clone), you get an issue tracker and a dedicated discussion thread for individual changes.

Re:Two dozen mathematicians wrote a 600 page book in 6 month... by lubomir on Thursday June 20, 2013 @04:36PM (#5914797)
Even when there is only single user branching can be quite useful, too. When I was writing my thesis, I usually worked on different parts at the same time. Having each changeset in a separate branch made it easier, especially when I procrastinated by fiddling with various settings like margins, colors and page styles.
Re:Two dozen mathematicians wrote a 600 page book in 6 month... by sampo on Thursday June 20, 2013 @04:29PM (#5914747)
> what is the advantage of Git over something like Dropbox

Merging. People can work on the manuscript at the same time, and as long as they edited non-overlapping regions, git will merge both contributions silently and painlessly.

Editing a word processor document stored in a shared Dropbox folder, I guess you'd need to inspect both new versions and do the merge manually?

Re:Two dozen mathematicians wrote a 600 page book in 6 month... by johnchristopher on Thursday June 20, 2013 @04:30PM (#5914752)
I'll try: Git repo can be forked, cloned and you can get to keep a local copy of whatever branches you prefer. Managing different versions from different authors while having an "offical" repo with dropbox seems harder to manage with dropbox than with git to me.

edit: just saw your edit :)

Re:Two dozen mathematicians wrote a 600 page book in 6 month... by tome on Thursday June 20, 2013 @05:02PM (#5914956)
I use version control even for personal projects with no collaborators. Just being able to see what's changed since you last recorded is a big win.
Re:Two dozen mathematicians wrote a 600 page book in 6 month... by jlgreco on Thursday June 20, 2013 @05:13PM (#5915021)
> Just being able to see what's changed since you last recorded is a big win.

Particularly with the fuzzy temporal revs thing, e.g. HEAD@{1 week ago}

Re:Two dozen mathematicians wrote a 600 page book in 6 month... by jonlarson on Thursday June 20, 2013 @04:32PM (#5914762)
Merging? If you have 2 dozen authors collaborating, there's bound to be people working on the same files.