7 ms·
Am I wrong, or does pushing to the dropboxed git repo at the same time from two different computers will corrupt the repo ?
by calculus 15y ago
Am I wrong, or does pushing to the dropboxed git repo at the same time from two different computers will corrupt the repo ?
- mmisu 15y agoIf 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.
- calculus 15y agoFor a single coder, I see no problems.
- mmisu 15y agoHope to not be wrong, but if you push different commits you should be safe.
- mikeash 15y agoIt 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.
- eli 15y agoI 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.
- mdwrigh2 15y agoEven 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.
- eli 15y agoCorrect, 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.