On a related note: I've once consulted for a team who lost weeks of work (and about to miss a deadline) because of their "git in Dropbox setup".
Their setup: dropbox, with a shared directory "project_foo". Everyone used "path/to/project_foo" as their working copy. They tried to replicate their previous, simple, centralised CVS workflow this way.
I helped them recover from conflicts in the .git directory. Dropbox "resolved" these and threw away crucial files. Resulting in a broken "git database".
Result: we recovered some work, some was lost for good. They missed the deadline and I learned a lot about the (very elegant) tree database of git.
In short: don't try this at home. Git in a Dropbox synced directory is a very bad idea.
Well, using the directory in Dropbox as a working copy is a bad idea. I found this out myself when it began to sync thousands of small files all the time when I switched between my desktop and my laptop. But this technique uses Dropbox as a remote and not as a working copy.
The company you where consulting for used a shared working copy? Why would they then still use git on top of that, if they thought that was a good idea? That whole setup must have been an immense nightmare even before it started to fall apart.
2
u/berkes Apr 26 '16
Nice solution!
On a related note: I've once consulted for a team who lost weeks of work (and about to miss a deadline) because of their "git in Dropbox setup".
Their setup: dropbox, with a shared directory "project_foo". Everyone used "path/to/project_foo" as their working copy. They tried to replicate their previous, simple, centralised CVS workflow this way.
I helped them recover from conflicts in the
.gitdirectory. Dropbox "resolved" these and threw away crucial files. Resulting in a broken "git database".Result: we recovered some work, some was lost for good. They missed the deadline and I learned a lot about the (very elegant) tree database of git.
In short: don't try this at home. Git in a Dropbox synced directory is a very bad idea.