Git 与 Dropbox 问题
关于 Git 和 Dropbox 的问题。我使用各种在线教程设置了 Git 和 Dropbox。当我推送项目时,我注意到 dropbox 文件夹非常小(1mb,而我的本地计算机上约为 4mb)。我很确定实际的文件没有被推送到保管箱。这是正常的吗?
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如已经指出的那样,Dropbox 并不是共享存储库的最安全解决方案(请参阅“这很愚蠢吗:通过 DropBox 进行 GIT 共享?
Greg "。 Bacon 表示 Dropbox 已经保留了旧版本的文件,这与 Git 已经做的事情有点多余。
请参阅“此讨论”(这是关于完整的存储库)备份,但不仅仅是一个裸仓库):
我将 dropbox 与
git 包
< /a>:仅同步一个文件。这样问题就少得多(但这也意味着像钩子这样的本地设置不是我的捆绑包的一部分)。
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):
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).
您可以考虑告诉 dropbox 忽略存储库中的 .git 目录。我使用 dropbox 来保存文件的副本(以防我用 git 做了一些愚蠢的事情并取消我的更改),但我不需要 dropbox 来保存 .git 目录的副本。
在保管箱首选项中,“高级”下有一个名为“选择性同步”的部分,可让您禁用特定文件夹的同步。
you might consider telling dropbox to ignore the .git directories in your repo. i use dropbox to keep copies of my files (in case i do something dumb with git and nuke my changes), but i don't need dropbox to keep a copy of the .git directories.
in dropbox prefs, under advanced there's a section called "selective sync" that allows you to disable syncing of specific folders.