Which is better Git or SVN Why
What can SVN do better than Git? [closed]
No question that most of the debates about programmer tools distill on either personal choice (by the user) or Design emphasis , this means , the optimization of the construction according to certain cases used (by the toolmaker). Text editors are probably the most prominent example - a programmer who works on Windows and programs at home in Haskell on the Mac who appreciates cross-platform and compiler integration and therefore chooses Emacs over TextMate, etc.
It is less common that a newly introduced technology is demonstrably superior to existing options.
Is this actually the case with version control systems (VCS), especially with centralized VCS (CVS and SVN) versus distributed VCS (Git and Mercurial)?
I've been using SVN for about five years and SVN is currently being used where I work. A little less than three years ago, I switched to Git (and GitHub) for all of my personal projects.
I can think of a number of advantages of Git over Subversion (which for the most part contrasts with the advantages of Git distributed over centralized VCS), but I cannot think of a counterexample - any task (which is relevant and occurs in a normal programmer's workflow), which makes Subversion better than Git.
The only one Conclusion I drew from this is that I have no data - not that Git is better, etc.
I suspect that there are such counterexamples, hence this question.
Subversion is a central repository
While many people want distributed repositories to get the obvious benefits of speed and multiple copies, there are situations where a centralized repository is more desirable. For example, if you have critical code that you don't want anyone to access, you probably don't want to put it on Git. A lot of companies want to centralize their code, and (I think) all (serious) government projects are in central repositories.
Subversion is conventional wisdom
This means that many people (especially managers and supervisors) enter the version numbers as usual and view the development as a "single line" that has become entrenched in their brains over time. Not an offense, but Git's liberality isn't easy to swallow. The first chapter of a Git book tells you to get all traditional ideals out of your head and start over.
Subversion does it one way and nothing else
SVN is a version control system. There are one Way to do their job and everyone does it the same way. Period. This facilitates the transition to / from SVN from / to other centralized VCS. Git isn't even a pure VCS - it's a filesystem, it has many topologies to set up repositories in different situations - and there is no standard. That makes it harder to choose one.
Further advantages are:
- SVN supports exclusive access control, which is useful for files that are difficult to merge
- SVN supports simpler binaries and large files (and doesn't require old versions to be copied everywhere).
- Adding a commit requires significantly fewer steps because there is no pull / push and your local changes are always implicitly re-based.
An advantage of Subversion over Git is that Subversion only allows checking out subtrees. With Git, the entire repository is one unit, you can only get all or nothing. With modular code, this can be quite nice compared to Git submodules. (While Git submodules have their place too, of course.)
And one small plus: Subversion can keep track of empty directories. Git keeps track of the file's contents so you won't see a directory with no file.
I can think of three. First, it's a bit easier to pin down, especially for non-developers. Conceptually, it's much easier than DCVS options. Second is maturity, especially TortoiseSVN on Windows. TortoiseHg is catching up quickly, however. Third, the type of beast - just a dump of a filesystem where you can inspect things from any level of the tree - can be very useful in some scenarios - like servers with no dozen of repositories.
That's not to say we're not putting all development on Mercurial.
- SVN repositories are easier to manage from the point of view of a manager and administrator (ACL + authentication methods + hotcopy + mirrors + dumps)
- SVN * hooks are easier to implement and support
- has more power and flexibility than submodules
- File system-based repository trees are easier to use than monolithic repositories with only logical separation
- SVN has more various Client tools
- SVN has usable third party web front ends, much better than Gits
- SVN doesn't break your brain
I wrote this as a comment on someone else's answer, but I think it's worth an answer in and of itself.
The carefully chosen configuration for SVN by my company requires file level locking to edit content and never ever uses merging. As a result, multiple developers are fighting over locks and it can be a severe bottleneck and never have the possibility of a merge conflict.
SVN definitely has better top-down management control than Git. During my Skunkworks migration to Git (please forgive instead of permission), I often scared my manager with the idea that there is no central master controlling server enforced by software, to which we are all slaves.
- Maturity - both the server and the tools (e.g. TortoiseSVN)
- Simplicity - fewer steps required, a commit is a commit. DVCS like Git and Mercurial involve commit and then push.
- Binary Processing - SVN handles executable binaries and images better than Git / Hg. Especially useful with .NET projects as I like checking build-related tools into source control.
- Numbering - SVN has a human-readable commit numbering scheme that uses only digits. Git and Hg do it very differently.
I guess you're looking for good information, but this type of question just invites, "I think git is so much profit, and svn the suxorz!" Reply.
Tried to find Git a little too hard for my small team. It seemed great for a large distributed team or group of teams that are geographically dispersed. I understand the benefits of Git very well, but source control isn't something that keeps me busy at night in my opinion.
I'm a deer hunter, and when me and my friends go out they are armed to the teeth and full of ammunition and high-tech gear. I show up with a single rifle, seven bullets and a goat knife. If it takes me more than seven rounds, I'm doing something wrong and I do it just like anyone else.
The point I'm trying is that if you are a small team working on a medium to small project and you are already familiar with SVN, use SVN. It's certainly better than CVS or SourceSafe, and it doesn't take me more than five minutes to set up a repository. Git can be over the top at times.
This is all relative and as maple_shaft said, if one works for you, to change you not yourself!
But if you really do something want, i would say it maybe better for designers, web programmers and the like - it handles it Images and binary files a bit better.
User friendliness. It's not really Subversion's credit, but TortoiseSVN's. TortoiseGit exists, but there is still a long way to go to conform to TortoiseSVN.
If you asked what Git does better than SVN, I would answer GitHub. It's funny how third-party tools make such a big difference.
If you do not have to branch out and merge , SVN (with TortoiseSVN on Windows) is very easy to understand and use. Git is too complex for the simple cases as it tries to make branching / merging easier.
(Many small projects never need to branch if they are well managed. Git is aimed at complex cases, so most Git documentation assumes that you need to perform complex operations such as branching and merging.)
Well my grandpa could use SVN on his Windows XP computer but he would have trouble using Git. Perhaps this is more of a performance from TortoiseSVN than TortoiseGit, but I think it has more to do with the fact that Git is inherently more powerful, and therefore more complex, and it would be pointless to downplay it to the same level.
Now it doesn't matter to my grandfather because he hasn't programmed anything lately. However, I was once on a team where our graphic designers also used our source control.
And these are people who just expect their tools to work (me too, but I have a realistic chance of getting them to work in the event of a mistake) and are intuitive. Aside from the fact that it would have been quite an effort to get them to get by with a DVCS, there was little to be gained. And with only two programmers on the team, it made sense for us to stay with SVN.
At work I couldn't switch the developers from SVN to DVCS for two reasons:
- Partial check-out (like only three folders from different depths in the project tree)
- File locking (reports in binary format)
- Feel secure when doing an 'svn commit'. Since commits go to the server, there is no way to make mistakes that will delete my changes after they are committed. In git, commits are local, so until I hit a stray 'rm -rf' and it's all over.
- Commits are authenticated. By default, I can say in git that I commit myself as someone.
- Less commands to learn for everyday use. You can get pretty far with 'svn checkout', 'svn up', and 'svn commit'.
- Shared registers work much better. When you go to commit you will be asked for your username / password. You don't have to remember to pass certain command line arguments. Sometimes we have a shared computer at work with a shared SVN checkout of a project. Someone could say, "Bob, can you see this on this computer" and he can and he can commit his changes as his user without making any mistakes.
- Repository layout. You can create an umbrella project and sub-projects, and choose what to review and when.
- Revision numbers are incremental integers.
- Developed for the central repository workflow.
Other people have posted some pretty good answers, but what about permissions? With Subversion over SSH you can set up a separate account for SVN on your server. Different developers can be given different access to different parts of the repository. Can GIT do that? I think Gitolit does exist, but it just doesn't seem that flexible or sturdy to me, nor do I know anyone who actually uses it.
- How do top students write their exams
- What is a daksh robot
- What is the least viewed video on YouTube
- How can I write a personal essay?
- How did the dust bowl end
- What are some romantic getaways in Illinois
- What is an e-bike
- After the 10th which subject should we take?
- What's the next model from Tesla
- When should I call myself a mathematician?
- Make Mercedes luxury cars
- Has Snapchat privacy
- What is the meniscus made of?
- What have your parents been hiding from you
- What are compressible gases
- What does the atmosphere look like in Saturn
- Muslims only pray in the mosque
- What are gentle skin cleansers
- What is your favorite waltz
- Why do Latvians emigrate from their country?
- The Lebanese university is taught in English
- How many halftones is a perfect 4th.
- Who invented the plasma ball?
- Dogs can open doors