Git与Dropbox问题 [英] Git with Dropbox Issues

查看:93
本文介绍了Git与Dropbox问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于Git和Dropbox的问题。我使用各种在线教程设置了Git和Dropbox。当我推进我的项目时,我注意到dropbox文件夹非常小(1mb vs本地机器上的大约4个)。我很确定实际的文件没有被推到Dropbox。这是正常的吗?



谢谢!

解决方案

指出,Dropbox不是分享您的回购的最安全的解决方案(请参阅这是愚蠢的:GIT通过DropBox共享?



Greg Bacon 指出, Dropbox已经保留了旧版本的文件,这对于Git已经做了什么。



请参阅这个讨论(这是关于一个完整的回购备份,不仅仅是一个裸回购,虽然):


那么,Dropbox在同步大量文件时会变得缓慢,而且Git在设计上会在硬盘上创建大量文件。您可以鼓励将很多文件打包通过定期运行 git gc ,将对象转换为少量打包对象。



另外Dropbox将开始同步东西只要你基本上做了任何事情: checkout stash commit fetch rebase reset 等。如果我工作得太快,Dropbox会开始 创建冲突副本

更糟糕的是,Git的内部存储更加脆弱(Git绝不是备份方法!),因为Dropbox被设计为处理你的平均 .doc 文件,这对于处理文件或文件名来说太粗心了。如果那里出现问题,您可能会看到自己不幸运。


使用Dropbox与 git包 :只有一个文件同步。

这种方式的问题少得多(但这也意味着像钩子这样的本地设置不是我的包的一部分)。

Question about Git and Dropbox. I set up Git and Dropbox using the various tutorials online. When I push up my project, I notice that the dropbox folder is very small (1mb vs about 4 on my local machine). I'm pretty sure that the actual files aren't being pushed up to dropbox. Is this normal?

Thanks!

解决方案

As it was already pointed out, Dropbox isn't the safest solution to share your repo (see "Is this plain stupid: GIT Sharing Via DropBox?".

Greg Bacon remarked that Dropbox already retains old versions of files, which is a bit redundant with what Git already does.

See "this discussion" (which was about a full repo backup, not just a bare repo though):

Well, Dropbox is known for becoming slow when syncing lots of files and Git, by design, creates lots of files on your harddrive. You can encourage packing those many loose objects into few packed objects by running git gc on a regular basis though.

Also Dropbox will start syncing stuff as soon as you do basically anything: checkout, stash, commit, fetch, rebase, reset etc. I'd fear that if I was working too fast, Dropbox would start creating conflicted copies of my files.

Even worse, Git's internal storage is even more fragile (Git is by no means a backup method!) and because Dropbox was designed to handle your average .doc files, it is just too careless when it comes to manipulating files or filenames. If something in there fails, you might see yourself out of luck.

I use dropbox with a git bundle: only one file to synchronize.
Much less issues that way (but that also means that local setups like hooks aren't part of my bundle).

这篇关于Git与Dropbox问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆