I need a backup that included uncommitte开发者_开发知识库d modifications because my developers don't like to commit often.
Just rsync
the clone ( including working directory) to another location frequently.
You can use Dropbox for this: just work from inside your dropbox.
Caveat: Does not backup when offline.
I think ebneter's answer has some merit.
The hardest part about using git is unlearning bad habits from all the other SCMs. It sounds like your developers need some proper workflow training. This will also require you to take some time to understand why they are resisting checking the code in.
For example, it may be the case that they just are against committing broken code. With git, this is not a problem as long as they don't push the code to a shared branch public repository. You also then need to train them on how to use rebase to squash the local commits together when they're ready to publish it.
Secondly, since the local commits are not backed-up, you still have a data loss problem. (Of course, this assumes the remainder of their files are not backed up, but out of the scope of this question.)
One solution would be to let your developers push their experimental branches to the public repository, then if anything happens, the commits are safe. Be sure to use a branch naming convention for the public repo, so there will not be any branch name conflicts.
精彩评论