卖给我分布式修订控制 [英] Sell me distributed revision control

查看:111
本文介绍了卖给我分布式修订控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有成千上万的类似主题在四处徘徊.我在SO中至少阅读了5个线程,但是为什么我仍然不相信DVCS?

I know 1000s of similar topics floating around. I read at lest 5 threads here in SO But why am I still not convinced about DVCS?

我只有以下几个问题(请注意,我只为Java项目而自私地担心)

I have only following questions (note that I am selfishly worried only about Java projects)

  • 什么是优势或价值 在本地提交?什么?真的吗?全部 现代化的IDE可以让您随时跟踪 您的更改?如果需要的话 可以还原特定的更改. 此外,它们还具有标签功能 您在IDE级别上所做的更改/版本!?
  • 如果我的硬盘崩溃了怎么办?在哪里 我的本地存储库去了吗? (因此,与签入中央仓库相比,这有多酷?)
  • 离线工作或在飞机上工作. 有什么大不了的为了我 用我的变更来构建发行版,我 最终必须连接到 中央存储库.直到那时,我如何在本地跟踪我的更改都没关系.
  • 奥克·莱纳斯·托瓦尔兹(Ok Linus Torvalds)献出生命 Git和讨厌其他所有内容. 足以盲目唱歌吗 赞美?莱纳斯生活在不同的地方 世界与离岸开发商相比 在我的中型项目中?
  • What is the advantage or value of committing locally? What? really? All modern IDEs allows you to keep track of your changes? and if required you can restore a particular change. Also, they have a feature to label your changes/versions at IDE level!?
  • what if I crash my hard drive? where did my local repository go? (so how is it cool compared to checking in to a central repo?)
  • Working offline or in an air plane. What is the big deal?In order for me to build a release with my changes, I must eventually connect to the central repository. Till then it does not matter how I track my changes locally.
  • Ok Linus Torvalds gives his life to Git and hates everything else. Is that enough to blindly sing praises? Linus lives in a different world compared to offshore developers in my mid-sized project?

给我投个招!

推荐答案

可靠性

如果您的硬盘无声地开始破坏数据,那么您真想知道它. Git接受您提交的所有内容的SHA1哈希值.您有1个使用SVN的中央存储库,如果它的位被故障的HDD控制器静默修改,您将不知道它,直到为时已晚.

Reliability

If your harddisk silently starts corrupting data, you damn well want to know about it. Git takes SHA1 hashes of everything you commit. You have 1 central repo with SVN and if its bits get silently modified by a faulty HDD controller you won't know about it till it's too late.

并且由于您有1个中央存储库,所以您只炸掉了唯一的生命线.

And since you have 1 central repo, you just blew your only lifeline.

使用git,每个人都具有相同的存储库,其中包含更改历史记录,并且由于其完整映像的SHA1,因此可以完全信任其内容.因此,如果您备份HEAD的20字节SHA1,则可以确定,当您从某个不受信任的镜像克隆时,您将拥有丢失的完全相同的存储库!

With git, everyone has an identical repo, complete with change history, and its content can be fully trusted due to SHA1's of its complete image. So if you back up your 20 byte SHA1 of your HEAD you can be certain that when you clone from some untrusted mirror, you have the exact same repo you lost!

使用集中式仓库时,所有分支都可以在这里看到.您不能建立私人分支机构.您必须建立一个尚未与其他全局名称冲突的分支.

When you use a centralised repo, all the branches are there for the world to see. You can't make private branches. You have to make some branch that doesn't already collide with some other global name.

"test123-该死,已经有一个 test123.让我们尝试test124."

"test123 -- damn, there's already a test123. Lets try test124."

每个人都必须看到所有这些带有愚蠢名称的分支.您必须屈从于公司政策,该政策可能遵循除非您真的需要 ,否则请勿分支机构",这会阻止您使用git获得很多自由.

And everyone has to see all these branches with stupid names. You have to succumb to company policy that might go along the lines of "don't make branches unless you really need to", which prevents a lot of freedoms you get with git.

与提交相同.提交时,最好确实确保您的代码有效.否则,您将破坏构建.无中间提交. 因为他们都去了中央仓库.

Same with committing. When you commit, you better be really sure your code works. Otherwise you break the build. No intermediate commits. 'Cause they all go to the central repo.

使用git时,您没有任何废话.分支并在本地提交所有所需的内容.当您准备好将更改发布到世界其他地方时,可以要求他们退出您的更改,或者将其推送到某些主要" git存储库中.

With git you have none of this nonsense. Branch and commit locally all you want. When you're ready to expose your changes to the rest of the world, you ask them to pull from you, or you push it to some "main" git repo.

由于您的仓库是本地仓库,因此所有VCS操作都非常快捷,不需要往返,也无需从中央服务器进行传输! git log不必通过网络来查找更改历史记录. SVN可以.与所有其他命令相同,因为所有重要的内容都存储在一个位置

Since your repo is local, all the VCS operations are fast and don't require round trips and transfer from the central server! git log doesn't have to go over the network to find a change history. SVN does. Same with all other commands, since all the important stuff is stored in one location!

观看 Linus的谈话,了解与SVN相比的这些优点和其他优点.

Watch Linus' talk for these and other benefits over SVN.

这篇关于卖给我分布式修订控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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