'Cost of Branching SVN vs GIT
Comparing SVN with GIT,
What's the relative cost comparison of creating a branch of a folder with 100 files (Just an example) between the two? Which of these have a cheaper cost?
Solution 1:[1]
Regardless of how many files, creating a branch is pretty much instantaneous in both systems. It's just creating a reference to a particular revision number.
Solution 2:[2]
In such case Subversion will create a "symlink" to the folder.
Copying / tagging / branching in Apache Subversion is instantaneous and cheap. Let me quote SVNBook | Using Branches:
Cheap Copies
Subversion's repository has a special design. When you copy a directory, you don't need to worry about the repository growing huge—Subversion doesn't actually duplicate any data. Instead, it creates a new directory entry that points to an existing tree. If you're an experienced Unix user, you'll recognize this as the same concept behind a hard link. As further changes are made to files and directories beneath the copied directory, Subversion continues to employ this hard link concept where it can. It duplicates data only when it is necessary to disambiguate different versions of objects.
This is why you'll often hear Subversion users talk about “cheap copies.” It doesn't matter how large the directory is—it takes a very tiny, constant amount of time and space to make a copy of it. In fact, this feature is the basis of how commits work in Subversion: each revision is a “cheap copy” of the previous revision, with a few items lazily changed within. (To read more about this, visit Subversion's web site and read about the “bubble up” method in Subversion's design documents.)
Of course, these internal mechanics of copying and sharing data are hidden from the user, who simply sees copies of trees. The main point here is that copies are cheap, both in time and in space. If you create a branch entirely within the repository (by running svn copy URL1 URL2), it's a quick, constant-time operation. Make branches as often as you want.
Read SVNBook!
Solution 3:[3]
What Cost metric are you referring to exactly? http://lostechies.com/derickbailey/2010/02/24/branching-strategies-the-cost-of-branching-and-merging/
Here is a brief breakdown on the differences between SVN and GIT. http://www.differencebetween.net/technology/software-technology/difference-between-git-and-svn/
Here is a link here on SO comparing the SVN 1.8 branching/merging to GIT. How is SVN v 1.8 branching / merging compared to Git?
Finally, here is SVNs comments on what a branch actually is (and what it is not): "Subversion's repository has a special design. When you copy a directory, you don't need to worry about the repository growing huge—Subversion doesn't actually duplicate any data. Instead, it creates a new directory entry that points to an existing tree. If you're an experienced Unix user, you'll recognize this as the same concept behind a hard link." http://svnbook.red-bean.com/en/1.5/svn.branchmerge.using.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | JW. |
| Solution 2 | |
| Solution 3 | Community |
