Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I keep about a dozen personal, non-critical projects in Dropbox. All are versioned with git, and it works great. Dropbox itself is versioned (since I'm a paying subscriber), so I have two layers of security there.

What negative experiences have you had with Dropbox + VCS?



Maybe it's better now, but I've had problems with .git folders in dropbox. Dropbox doesn't understand the directory structure and conflicts are handled by merging competing .git folders and renaming internal files as needed -- almost certainly not what you want.


I can't speak for before I started using Dropbox with git, but for the past 3 years, conflicts are handled well (and not as you describe).

First of all, Dropbox will not overwrite data. If it finds a conflict, it will save a second file with "[machine name]'s Conflicted Copy" and the modification date at the end.

This hasn't happened to me with any git files yet, however, because my machines are always online. That means my working tree is always the same across devices and my .git folder is always identical.

The only way a conflict would be created is if I committed while working offline and then committed on another machine while working offline.

If that happens, I could just grep my Dropbox folder for files with "conflicted" in the name and remove them. Or, because I committed my files to a remote (often Github, but sometimes others), I could just delete the local copy and clone.


Sure, I'm not suggesting there would be permanent data loss... but doesn't Dropbox renaming a bunch of files deep within .git folder result in an unusable repository that you'd have to fix by hand or restore from backup?


This whole discussion made me curious, so I tested it. Dropbox doesn't rename files. It creates new files. All you have to do is delete the new files (which are really "forks" of your current data) and you have your working tree synced with your data store again. It's really easy.


Storing .git folders in dropbox doesn't seem like the best idea. You could keep a git repository in a different location and have a small build script like this https://github.com/minhajuddin/notes.minhajuddin.com/blob/ma... which builds your website and copies it to a dropbox folder. With this approach you could even use something like http://middlemanapp.com/.


Why? Security? Something else?

I have 2+ side projects or submodules under development at any given time. I've been storing them in Dropbox for the last 3 years. I've been working on them actively from 3 different machines (two Ubuntu desktops and one OS X laptop), and they're turned off -- so not syncing -- when I'm not using them.

All that said, I haven't had one single problem. So empirically speaking, I don't see any problem with the mechanics of .git folders in Dropbox.

(Note that my key files, API keys, etc. are not synced to Dropbox.)


I have had many instances of copies of files being created when there is a conflict. This shouldn't happen if the syncs happen before you work on a file (which is your situation). The main issue for me is that dropbox doesn't explicitly tell you that there is a conflict, it just creates a file with the other machine's name and you may end up scratching your head for a long time before figuring out about the conflict.

To be honest, I haven't tried storing git repos on Dropbox so these are just my assumptions based on dropbox usage for other files. I am just afraid that it may end up corrupting my git repo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: