Single developer Git with Dropbox backups: finding a secure, simple configuration

I would like to use Git

for a single developer project, but how do I make backups using Dropbox?

There are actually several posts discussing either Git

working with a single developer or using Git

Dropbox with multiple developers, but the ones I saw did not address the biggest issue:

If Dropbox maintains a local `.git` repository while it changes, the repository can be left in an inconvenient, unrecoverable state.

To be clear, let's say I have a directory Working

containing a repository Git

as a subdirectory .git

. This is my main repository. The from ~/Dropbox

symbolic link points to "Work", thus creating a backup .git

. I never push or pull anything: everything is local.

If I perform a local transaction Git

on Working

that changes in this way .git

, Dropbox may decide to back up at that point .git

. If my machine crashed then, I would have a useless repository .git

on the Dropbox server: I would not be able to recover files from it.

+3


source to share


1 answer


I have always recommended not to use DropBox directly with the contents of the .git folder: there are too many files that could potentially change too many times.



I suggested in Backing up a local Git repository to use : this only creates one file (which acts like a Git repository) and DropBox won't have a copy problem. git bundle

+1


source







All Articles