Sell me distributed revision control

前端 未结 10 1818
滥情空心
滥情空心 2020-11-22 04:12

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?

I have only following questions (not

10条回答
  •  长情又很酷
    2020-11-22 04:30

    I'm not going to sell anything here.

    • 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!?

    The only real advantage is that you don't need to need connectivity to the main central repository. Someone can say that Git's benefit is the fact that a developer can commit locally, preparing a great combo of patches and then pull them to the blessed central repo, but IMO this is pretty uninteresting. A developer can use a private shelve or a branch in Subversion repository to work on his task and then merge it with a mainline (e.g. /trunk) or another branch.

    For me the main downside here is the fact that I have to download and store the whole Git repository on my machine. With a large project with looong history it becomes a pain and takes too much space.

    Another downside of being centralized is that Git technically can't track renames or copy operations. It just tries to guess whether a file was renamed or copied based on the file's content. This results into such funny cases: svn to git migration keeping history of copied file (Guy is asking why the history of a file has been lost after SVN>Git migration, ).

    • 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?)

    With Git, if you crashed your local storage device (HDD, SSD, whatever) and it had changes that were not pulled or pushed to a blessed Git's repo, then you are out of luck. You've just lost your time and your code. In addition to this, a crash of a hard drive with your local Git repo may halt development process for some time: Linus Torvald's SSD breaks, halts Linux kernel development.

    With centralized source control such as SVN, you could only lose your last commit because all your work was already committed to the central repository to a branch, private shelve or even trunk. Obviously, you should ensure that there is a disaster recovery and backup implemented for your central repo.

    • 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?

    For such a project as Linux Kernel that used BitKeeper in the past, Git is the best source control system! But I'd say that Git does not suit everyone.

    Choose wisely!

提交回复
热议问题