News for hackers. Stuff that matters.
Re:Using Git with Dropbox by calculus on Friday March 16, 2012 @11:20AM (#3713647)
Am I wrong, or does pushing to the dropboxed git repo at the same time from two different computers will corrupt the repo ?
Re:Using Git with Dropbox by eli on Friday March 16, 2012 @12:00PM (#3713833)
I managed to screw up a git repo in Dropbox. I believe it was by making a commit on a non-connected computer than making another commit before the first one had synced to dropbox.

It was not the end of the world, but I would not recommend storing git repo in dropbox. If it's really something so small and insignificant that it doesn't need a git repo, then just put it in dropbox. If you want to use git, take the time to set up a proper repository.

Re:Using Git with Dropbox by mdwrigh2 on Friday March 16, 2012 @12:20PM (#3713932)
Even if you do screw it up, the commit should all be there and valid. The only thing that happens is HEAD won't point to the right commit on other boxes, and then when you do sync you'll clobber the file containing the commit for HEAD, thus losing the other commits. Fortunately, they'll still exist until a gc occurs, so you can go find them in reflog.
Re:Using Git with Dropbox by eli on Friday March 16, 2012 @02:56PM (#3714756)
Correct, I still had my HEAD files, but everything else seemed pretty broken. I'm not a Git expert by a long shot, but I would imagine that Dropbox renamed some files like "Foo.bar (Eli's Conflicted Copy)" and that really confused the history.

Anyway, not something I would recommend.

Re:Using Git with Dropbox by mmisu on Friday March 16, 2012 @11:23AM (#3713655)
If you have multiple users use different branches, I think this page was written from the perspective of a single coder that needs to keep track of his own code in a safe way.
Re:Using Git with Dropbox by calculus on Friday March 16, 2012 @11:41AM (#3713749)
For a single coder, I see no problems.
Re:Using Git with Dropbox by mmisu on Friday March 16, 2012 @11:24AM (#3713663)
Hope to not be wrong, but if you push different commits you should be safe.
Re:Using Git with Dropbox by mikeash on Friday March 16, 2012 @11:55AM (#3713807)
It can, yes. It's relatively rare though. The nice thing about git is that, when it happens, you can just nuke the Dropbox repository and rebuild it without losing anything. Git's checksums guarantee that the corruption results in an error and not bad data.