Practical Reasons To Choose Git Or Subversion? 667
markmcb writes "I develop Rails applications and recently followed my lemming herd and made the switch to Git after learning some of the practical advantages Git offers over Subversion. As I'm sure there are many die-hard Subversion fans in the Slashdot audience, I'm curious what your key reasons are for sticking with Subversion. If possible, I'd like reasons that apply to 'most of the time' as opposed to arguments based on obscure features that may get used only a few times ever."
Blah (Score:5, Funny)
You can have my cvsroot when you pry it out of my cold dead fat hands.
Re: (Score:3, Funny)
My workplace still uses RCS. We also use XEmacs 19.13, a 1995 codebase last built in 2001.
Re:Blah (Score:4, Funny)
Re: (Score:3, Funny)
Just think how much time you could have saved if you didn't have to constantly switch modes in your editor and instead used your fingers simultaneously...
Re:Blah (Score:4, Funny)
Re:Blah (Score:4, Funny)
at least you aren't using CMVC at a company that developed rational team concert, jazz, clearcase, etc...
Re: (Score:3, Funny)
Re: (Score:3, Funny)
You can have my cvsroot when you pry it out of my cold dead fat hands.
Shut up, McCain.
Windows. (Score:5, Interesting)
Git is an excellent piece of software, but Windows performance is not so great. Git is too UNIX centric to be fast on Windows in the near future.
Other distributed SCMs often are interpreted and just as slow as git (on any platform), so this might not be a concern for me.
Re:Windows. (Score:5, Funny)
Git is an excellent piece of software, but Windows performance is not so great.
Git could paint your house and buy you a girlfriend, but that wouldn't help Windows.
Re:Windows. (Score:5, Funny)
Git could [..] buy you a girlfriend
Dunno 'bout you guys, but that right there settles it for me. Git it is!
Re:Windows. (Score:5, Funny)
Git could [..] buy you a girlfriend
Dunno 'bout you guys, but that right there settles it for me. Git it is!
Congratulations. Your new girlfriend's name is 'Richard Stalman' and you can call her 'RMS' for short.
Enjoy your new girlfriend.
Yours faithfully,
GIT
Re:Windows. (Score:5, Funny)
Just be careful with the order of command-line args. You wouldn't want it to paint your girlfriend (or maybe you do?).
Re: (Score:3, Funny)
Mmmmmm, body-painting...
Re:Windows. (Score:5, Interesting)
I've migrated my projects to Mercurial and is actually FASTER than Subversion on Windows and Linux for commit/update/status/blame.
Mercurial is slower than GIT on Linux, but I just don't care.
Re:Windows. (Score:5, Interesting)
Mercurial is slower than GIT on Linux
Sometimes slower, sometimes faster, usually about a tie in my experience. Measurements on kernel tree import and initial commit showed roughly a tie.
But Mercurial is _way_ more obvious and pleasant to use than Git. I use both, but any time I have the option I choose Mercurial.
Re: (Score:3, Interesting)
Git is an excellent piece of software, but Windows performance is not so great. Git is too UNIX centric to be fast on Windows in the near future.
Speed isn't the only factor when choosing a version control system (or even the most important one), but considering its lightning speed on unix-likes, I wouldn't be all that surprised if git's less-than-brilliant performance on Windows is still faster than SVN.
Re: (Score:3, Insightful)
Another factor in a Windows-centric corporate environment, SVN will function very usefully without a server. While I would prefer to have a proper repository server, the IT departments of most of my clients simply refuse to support anything outside a small range of "corporate esentials". Since a SVN repository on a file share is better than no VCS, that's what ends up being used.
Re:Windows. (Score:5, Informative)
I'd just like to say that I *love* tortoise.
I work primarily in Windows now, but I grew up using the command line and have a number of years of experience in unix and linux. Setting things up for subversion using the command line always saw me digging back through docs to remember how to do it because I don't have to do it every day.
With Tortoise, a couple of clicks and it's done. It saves me time and sanity.
IDE Integration (Score:5, Interesting)
Re:IDE Integration (Score:5, Insightful)
Clearly, you've never used git to think that some UI can make subversion usable.. Try merging a reasonably-sized branch with subversion (and you'll fail and cry and ask why oh why you didnt use git).
Re:IDE Integration (Score:5, Interesting)
Try merging a reasonably-sized branch with subversion (and you'll fail and cry and ask why oh why you didnt use git).
Simpler solution: stop merging reasonably-sized branches.
I know that's not reasonable for every situation, but about 90% of the time I see people doing lots of branching and merging, it's a response to screwed-up organizations or dysfunctional personal relationships. I saw one team move to git from subversion because, at the root, a couple of developers were arrogant assholes and their manager was a chinless milquetoast who let them get away with it.
That's not to say git isn't awesome for certain situations, mind you. But branching and merging adds a fair bit of overhead, and anything that increases a project's overhead should be your last resort, not your first.
Re:IDE Integration (Score:5, Insightful)
I constantly branch and merge even when I am the only one working on a codebase. When branching and merging are so easy why wouldn't you take advantage of it? Of course, it is always possible that I have a dysfunctional relation with myself.
I can't speak for how awesome git is, I've never used it.
If branching is increasing your workload instead of making things easier you are most likely not using a source control system that is good at branching and merging.
Re:IDE Integration (Score:5, Insightful)
I constantly branch and merge even when I am the only one working on a codebase. When branching and merging are so easy why wouldn't you take advantage of it?
I do, too. I call it "checking out" and "committing". I do it every few hours.
If branching is increasing your workload instead of making things easier you are most likely not using a source control system that is good at branching and merging.
When I'm building a unified product, what need would I have of branching and merging? If I'm not sure if something is a good enough idea to build, I don't build it. Or I build a quick, throw-away implementation to check an idea out. And then I throw it away.
No matter how good a source control system is at branching and merging, it can't solve the real cost: maintaining a understanding of different, semi-incongruent notions of the project, and then resolving those differences. The whole point of branching is to increase complexity, and excess complexity is the enemy of every good software project. As Occam's razor says, you shouldn't multiply entities beyond that which is strictly necessary.
That's not to say I never branch. But it's always a last resort for me, no matter how awesome the source control system is.
Re:IDE Integration (Score:4, Insightful)
There are a lot of times I don't branch, but it's usually out of laziness and I end up regretting it at some point in the project.
Easily, the most common reason for branching is a stable-versus-development split. I've run into it in virtually every project I've been on that involved any other people (even just as employer), and even a number of my personal projects. Stable branches almost always need an occasional bugfix or super-quick feature that I can be reasonably sure to get in in a one or two commits, and typically these things need to go out ASAP. I've run into that a million times with copy changes. In programming world, copy changes are usually the lowest possible priority thing, but with clients they're often some of the highest priority.
Point being, if I'm ever working on adding some major feature--really anything that will take more than a couple days, and sometimes even when it won't--I'm likely going to be better served doing it in a branch. If it happens that I get through it without needing to make any changes to the stable code, sweet! The merge is going to be super quick and easy. If not I'm going to be very glad I took the time to branch or regret not having done so. "I can't make your change right now because I have a ton of half-finished in-development code" is not an excuse people are interested in hearing.
Re:IDE Integration (Score:4, Insightful)
Easily, the most common reason for branching is a stable-versus-development split.
I agree that's popular, but I don't think it's a good idea. Wouldn't it be better to have every check-in be stable?
I've run into that a million times with copy changes. In programming world, copy changes are usually the lowest possible priority thing, but with clients they're often some of the highest priority.
Yes, you could solve the problem that way. I normally solve it by releasing frequently. It's pretty rare that people mind waiting a few days. Or if they need to change copy a lot, by putting the copy in a content management system, so they can change it whenever they get the urge.
I can't make your change right now because I have a ton of half-finished in-development code
I solve that by not having a ton of half-finished code. Ship early, ship often, I say.
Re: (Score:3, Insightful)
I agree that's popular, but I don't think it's a good idea. Wouldn't it be better to have every check-in be stable?
When adding a new feature that might take 2-3 weeks to be "stable", do you use a different system to back up your work each day? Wouldn't it be easier to make a branch you could commit to back up to each day, then merge it in when your branch is stable?
Re: (Score:3, Insightful)
When adding a new feature that might take 2-3 weeks to be "stable", do you use a different system to back up your work each day?
I don't check in things that I don't think are stable. I do that primarily through test-driven development and pair programming, plus automated acceptance testing and showing new versions to product management and/or QA every few hours.
Bugs only get harder to find over time. It seems a lot cheaper to me to kill them dead as soon as possible, rather than storing them up and trying to find them later.
Re:IDE Integration (Score:5, Insightful)
So I guess you've never worked in the real world, where corporate mandates a change that has to go out before EOB same day, or where you are half way through a feature set impl, and management changes the priorities. What do you do with that code then? Or when the CTO ups and quits, and his info has to be yanked from the website in 30 minutes or less.
Often you need three branches at least, one for dev, one for staging, and one for production. And that's not counting the system rewrite branch that might be bumbling along in the background perpetuated by another developer whose been assigned to fixing all the wrongs in the current system.
And let's not even start down the path of trying to integrate people's work in subversion who are in a big team when someone has gone three weeks without a commit because they are working on a major new feature. And that's not even starting to talk about database updates and how they have to be applied in the process between co-ordinating developers.
Then we can talk about the offshore development team who isn't trusted to put changes into the main branch without a peer review from someone onshore.
And then you get sued by a competitor who accuses you of stealing their code because you hired one of their developers and they have some random bit of proof, so you have to make a new branch to incorporate whatever random changes legal decides are appropriate to mitigate that, that have to be reviewed by an independent third party who takes three weeks to do anything, and you can't just stop development and wait for them.
And what happens when you have to update the docs that should be in version control too for someone else, particularly manuals for a release that is concurrent with ongoing development, or even historic because something somebody put in the manual six months ago has turned out to be wrong, and they have to be updated for that release that people are still buying.
Showing product to the client (because that's who really calls the shots, not the product manager) every few hours is just plain impractical. Most people don't want to see updates every few hours, they want a finished product in clear review cycles. They don't have the time to review the entire system every few days let alone every few hours. A full QA cycle for a normal sized product can last a week. Do you just stop development while they do a full QA before a release?
And let's not even mention bugs that are transient and may only show up six months down the road when more people start using the system, like race conditions which have become apparent in code that was written two years ago and nobody remembers for toffee. What about storage checking - the system was written by someone who thought that storage would never run out, so why check to see if there is enough space on the disk to complete the operation, and the application crashes and is down for a while while some poor sysadmin tries to find more disk space.
And the application that wasn't maxing out the network until it was deployed at a client with 300 users, and now you have to go back and rework your com model from a year ago. It's not exactly a bug, but you're gonna have to fix it anyway.
What about a large scale integration with a pre-existing piece of software that might take a month to complete? You can unit test each piece of it sure, but you can't release the whole thing until the integration is totally complete.
There are SO many reasons you have to have branches in the real world.
Re: (Score:3, Insightful)
I agree that's popular, but I don't think it's a good idea. Wouldn't it be better to have every check-in be stable?
Yeah, and it'd also be nice if software was released without bugs. Every non-trivial change (and more trivial changes than you or I would like to think) introduces the chance for an unintended consequence. If you are attempting to ship a solid product and you need a critical bug fix ASAP, you really want to start from EXACTLY the code you shipped last time and make the minimum change to fix the critical bug.
For some, especially informal users, a frequent release schedule with lots of miscellaneous changes
Re: (Score:3, Insightful)
I agree that's popular, but I don't think it's a good idea. Wouldn't it be better to have every check-in be stable?
Not always.
In the real world, a development branch often requires coordination between multiple programmers; I change the broken API to FooLib. I know that this breaks the callers, but that's okay because we're working in the "big changes to FooLib" branch. I test that FooLib 2.0 works okay, then check it in to the dev branch. The rest of the team updates their code bases which use FooLib to
Re:IDE Integration (Score:4, Informative)
I constantly branch and merge even when I am the only one working on a codebase. When branching and merging are so easy why wouldn't you take advantage of it?
I do, too. I call it "checking out" and "committing". I do it every few hours.
That may work fine when you're the only one working on the code, but if you're working with someone else, and he's committed code that you don't think is any good (or at least not ready for production yet), but later commits from you are, then with a single trunk you're simply out of luck.
If branching is increasing your workload instead of making things easier you are most likely not using a source control system that is good at branching and merging.
When I'm building a unified product, what need would I have of branching and merging? If I'm not sure if something is a good enough idea to build, I don't build it. Or I build a quick, throw-away implementation to check an idea out. And then I throw it away.
But what if you've been working on something that seemed like a good idea at the time, and suddenly you realise you're going completely in the wrong direction and need to undo a lot of commits (but you want to keep the other bugfixes you did)? Or what if someone else is working on the same project?
Git makes these things pretty painless.
No matter how good a source control system is at branching and merging, it can't solve the real cost: maintaining a understanding of different, semi-incongruent notions of the project, and then resolving those differences.
No, it can't resolve your personal differences for you, but it can prevent others from polluting your codebase. It can make it easier to undo others' mistakes. Or your own.
The whole point of branching is to increase complexity,
Have you read what you just wrote here? Ofcourse the point of branching is not to increase complexity. It's to reduce it. The problem is that with many source control systems (like SVN) the subsequent merging is complex and often needs to by done by hand. With git, that's not the case.
Despite what a lot of people say, it's actually not true that git makes branching and merging easy. It makes it unavoidable, trivial and painless. It's only in other systems where branching and merging adds complexity.
That's not to say I never branch. But it's always a last resort for me,
Well, with git, it needn't be the last resort. You'll be doing it every day without even noticing.
Re: (Score:3, Insightful)
That may work fine when you're the only one working on the code, but if you're working with someone else, and he's committed code that you don't think is any good (or at least not ready for production yet), but later commits from you are, then with a single trunk you're simply out of luck.
This is back to my original point. If I'm working with people who are regularly checking in bad code, then I solve that by talking with the person. Why would I let him go on doing dumb things any longer than necessary?
But what if you've been working on something that seemed like a good idea at the time, and suddenly you realise you're going completely in the wrong direction and need to undo a lot of commits (but you want to keep the other bugfixes you did)? Or what if someone else is working on the same project?
I mainly solve this by making sure it doesn't happen much. Branching can only save you if you realize it's a bad idea before you merge to trunk, only if your changes are mostly bad. I think the solution to bad ideas is better product management, not better version control.
Have you read what you just wrote here? Ofcourse the point of branching is not to increase complexity. It's to reduce it.
Let's take a simple e
Re:IDE Integration (Score:5, Interesting)
Looks like the reason he likes Git is because he's used to thinking of the other people he develops with as idiots, and it makes it easy for him to deal with them.
The talking down at you attitude is supporting evidence....
Re:IDE Integration (Score:5, Insightful)
When I'm building a unified product, what need would I have of branching and merging? If I'm not sure if something is a good enough idea to build, I don't build it. Or I build a quick, throw-away implementation to check an idea out. And then I throw it away.
So you've never implemented something and then wished you could revert a change that didn't work out? Or have never wanted to incrementally implement something without incorporating it into the final product until it was fully complete? Really?
Re:IDE Integration (Score:4, Insightful)
Admittedly my code is rarely ever rolled back, but when I do have to it's as easy as choosing the commits included and in that piece of code and removing them.
Which is non-trivial when multiple people are working on the same codebase. It's the precise reverse of the merge problem. Although I would contend it's actually conceptually harder. It's much easier to look at a pair of changes and merge them, either automatically or manually. But trying to unwind two sets of intertwined changes is not my idea of a fun time.
I'm not against distributed SCM in anyway, but I will say that from everything I have read distributed SCM does not alleviate the need for manual conflict resolution in anyway shape or form
I never said it did. What I said was that users of distributed SCMs have discovered that conflicts simply aren't that big of a problem in everyday use.
Why do you have broken code in your working copy?
I don't have broken code in my working copy. I have in-progress code in my working branch. Why do I have that? Because the SCM exists to hold my code. It allows me to compare my code against mainline so I can review my changes. It allows me to incrementally update and revert my work as I go along. It allows me to ensure that all my changes are in an SCM which is backed up daily, so that I don't have to worry if my desktop crashes. It allows me to work in multiple locations on the same codebase. In short, it lets me use the SCM to manage my sourcecode, both my in-progress, working efforts, as well as the stable, in-production codebase.
Besides which, you seem to have this rosey picture that every commit is a good one. Believe it or not, people make mistakes. And when the guy down the hall accidentally breaks the database because his upgrade script is slightly b0rked, I don't want to waste time while they get their shit together.
And why is anyone committing code that either does not compile or does not pass your unit test suite?
Because no test suite covers all bases. And because people simply make mistakes.
Honestly, have you actually developed in the real world?
Huh? Why revert or delay anything.
I see you've completely missed the point. Here, let me be more explicit:
1. Project X has a deadline looming. In project X, management has scheduled features 1, 2, and 3 to be included.
2. A month before the deadline hits, the developers for feature 3 report that they are behind schedule and that feature 3 will have to be excluded from the release.
3. ?
The question is, what do you do at step 3. If you believe that all development should happen in trunk, then the developers now have to find a way to revert all the changes that make up feature 3 (naturally they've been using the SCM to interact amongst themselves). This could be an extremely non-trivial task depending on the complexity of the change.
Or, if you believe that all major development such as this should happen in branches, then the managers need only decide not to incorporate the changes from feature 3 into trunk.
And if you've never encountered this situation, I strongly question your experience, as this is pretty typical (just ask Microsoft about how WinFS is going).
Branch out only the stable code into your release branch.
Ha ha ha. Okay, now you're just being funny, right? What, you think you can just cherrypick changesets and build a release? Have you never built a large, non-trivial application with multiple developers? Or a database driven application where multiple, interlinked changes need to be made to the schema? Sorry, but the interdependency between changesets means that's just unrealistic in practice. And I've seen it tried... it ain't pretty, to say the least. Just the process of trawling through the changelog to identify all the mods that went into some feature, so that you can revert them, is an absolute frickin' nightmare. And that's ignoring the process of actually revertin
Re: (Score:3, Insightful)
Branching and merging is a fact of life. If you don't branch or merge, likely your project is either trivial or your pool of developers small. Larger projects with many developers require the ability to branch and merge large bodies of code. Attributing this fact to personalities is nothing but hand waving. Personality conflicts may be the root-cause for you but is not the root for the majority of people that require such functionality.
Simple fact is, branching and merging is required for complex software d
Re:IDE Integration (Score:5, Informative)
It's because people have trouble forming teams and maintaining strong relationships in large groups.
No, it's because:
1) Software companies often need to create large, new features, and don't wish to destabilize the core product.
2) Or it's because it's *far* easier for developers to be able to branch pieces of code, work on feature or bugfix development in their own little playpen with all the SCM bells and whistles (being able to revert a messed up piece of code is awfully handy, even if you're the only one working on the codebase), and then merge those changes when they're ready. This also facilitates easier code review (just check out the branch) and change control as a nice added bonus.
3) Or because, in a more contract-oriented world, they might need to build customized applications for customers, and branch-and-merge strategies make that kind of code management possible.
Honestly, if you've never seen the need to branch-and-merge, you've never worked on a large project. Period.
Re: (Score:3, Informative)
Software companies often need to create large, new features, and don't wish to destabilize the core product.
Solution: stop checking in stuff that doesn't work. I do this through unit testing, acceptance testing, pair programming, working within a few paces of a product manager, and a few other practices.
Or it's because it's *far* easier for developers to be able to branch pieces of code, work on feature or bugfix development in their own little playpen.
I don't have anything against local copies. It's kinda hard to change the code if you can't change the code.
being able to revert a messed up piece of code is awfully handy
True. I use an IDE with undo for small cases of this, and reversion to head for large versions. But I think a better solution is to find mistakes early, so that screwing up is easy to fix.
This also facilitates easier code review
This is true only i
Re:IDE Integration (Score:4, Insightful)
You can always tell when someone is making an unfounded claim based on their own narrow experience being all that matters: They say "Period" at the end.
Some large projects are organized and run in ways that require branching and merging. Some are organized and run in ways that don't. Generally these decisions are mandated by factors that have nothing to with any developers preference about source control or anything else, but are based on the external nature of the project at hand or management decisions or whatever.
As far as reccomendations:
I work on a project that does very little branching & merging. We use SVN, and I like it (Tortoise in particular) very much, so I recommend it if you don't need a lot of branching and merging. If you do need a lot of branching and merging, I've heard it's a PITA, so you should check into that. You probably know if you do, or will do, a lot of branching and merging, and you should choose an SVN system based on that, and not worry what anyone else thinks it says about the size of your project or ability to form teams.
Re:IDE Integration (Score:5, Informative)
That's not to say git isn't awesome for certain situations, mind you. But branching and merging adds a fair bit of overhead, and anything that increases a project's overhead should be your last resort, not your first.
Well OK, those principles are appropriate for traditional tools like CVS and SVN. Branching and merging adds a lot of overhead if your SCM isn't built to handle it. But once you've used a modern SCM like Git or Bzr, you'll know that with Git you literally cannot branch too often. Don't think of Git branches like you think of Subversion branches, it's a whole different playing field.
I have a rule of thumb with Git: every time I set out to implement a new feature, if I think it's going to take more than a single commit to bring into the mainline, then I make a new branch for it. Working on three different features at the same time? Then use three different branches, and switch between them at will.
So what's the big difference between SVN and Git that allows such carefree use of branching? There are a few points to understand:
In conclusion, 90% of the time I see people advocating the use of branches only as a last resort, it's because they're using the wrong SCM =)
Re: (Score:3, Interesting)
but it doesn't mean much when SVN's handling of merges is so primitive.
Precisely. I like this think of it this way: Einstein said "Make everything as simple as possible, but not simpler." When Subversion tried to be elegantly simple by having tagging and branching be exactly same operation as cheap copies, they went too simple.
Command line is easier (Score:3, Informative)
Funny, but I've never got the IDE plugin for *any* version control system working well. Since I always have at least one command window open, typing "git commit -a" is faster and easier than locating the corresponding menu, clicking on it, and praying that it will do exactly what I want.
Disclaimer: Of course, this doesn't mean I don't use the many other functions that work better on an IDE than in a text command. I can use vi o
Re: (Score:3, Insightful)
For example, my IDE (IntelliJ IDEA) allows me to view history for a _selected_ _class_ or even a piece of code. Even across branches and merges.
Try to do it from a command line (you can, but you'll need a lot of 'blame' and 'log' commands).
Re:IDE Integration (Score:5, Insightful)
You feel free to wait around for "integration". The command-line client is already nicely integrated into my IDE, which is the most mature, most stable, and most flexible one in widespread use: Unix.
Re: (Score:3, Funny)
Yes, but unfortunately for you the kids aren't traipsing on your lawn these days.
What about Git vs. Bazaar? (Score:5, Interesting)
They are both of the "distributed" kind.
Re: (Score:3, Informative)
This thread is prompting me to have another go with git on Windows ; I've been using Bazaar for my project (both the source for the project, and the version control for the actual content of the project).
The performance on Windows has come along in leaps and bounds since v 0.9 - it started off just "a lot faster than Subversion", it's got to the point where it's "wheee, that's fast".
Of course, you try out the same file tree with Bazaar on Linux and the speed makes you a little green with envy...
Bazaar isn't
Re:Exactly. Use a solution for modern problems (Score:4, Interesting)
Git, Bazaar, Mercurial, Darcs and a few other distributed systems are the only ones I've entertained since I lost interest in RCS/CVS years ago. No one in their right mind should be even thinking about so-called tools like SVN these days.
Well, there is one big advantage to SVN: it's possible for mere mortals to understand how it works. To understand git you have to be a fucking genius.
But the awesome magic that git does makes git a worthwhile investment.
Re: (Score:3, Insightful)
Familiarity? (Score:5, Insightful)
Comment removed (Score:5, Informative)
Re:my choice (Score:4, Insightful)
I also like the central server aspect, so that there is one place where the code is located, and I just have to keep that backed up.
Nothing wrong with that, if it's effective for you and your team, and clearly svn wins out over git. Trying to make git within that model is just adding complexity without getting the benefits. If, in the future, you and your team decide you need to change how you do source control, then git, or some other distribute peer-to-peer system, might be the solution. But don't just use it as a drop-in replacement for centralized server development.
Re:my choice (Score:4, Interesting)
But don't just use it as a drop-in replacement for centralized server development.
I disagree. You can take advantage of git's other positive aspects even if you manage a central repository: Common operations are speedy, local branching, and easy merges are all benefits you get by using git regardless of whether you take advantage of the distributed nature of git or not.
I won't go so far as to say that all other SCM is total crap, but having recently switched my code repositories to centralized git repositories, I certainly wouldn't go back or put a new project in anything else. It was so easy converting my previous repositories to git (preserving history) that I think many people can and should consider git as a "drop-in replacement" for other SCM.
The only reason I can think of to not go with git is (like the OP pointed out) the lack of nice UI tools (and premature Windows support). I can totally understand how this may be a show-stopper for many groups and projects, and that's fine. But to those groups or individuals not on Windows who aren't afraid of a few easy command-line programs, do yourself a favor and switch to git. Really, it's that much nicer.
Re: (Score:3, Insightful)
I'm not afraid of the command line, but I'll be damned if I'm going back to IDE-less development for any project more complex than a simple webapp.
I don't use Windows for development, but I DO need my IDEs.
Git fails because of the lack of integration. Until it has that, it does not fit my needs. What's more, it fails to start with because they didn't consider that in the first place. A "simple text editor" dev environment stopped being useful or productive back in the 90s.
Re: (Score:3, Interesting)
So as a cmd-line user who only uses centralized repositories (with only a couple of other developers), what kind of benefits would git provide over subversion?
Git would allow you to revert individual commits by other developers. That's something SVN will never be able to do. We just implemented a setup where each developer has his own repository on github, forked from the main repository on github. This makes it very easy for the guy with the final responsibility for deployment to decide which code he accepts and which he doesn't, while everybody else can easily accept whichever commits they like.
This is really useful when some people are committing crazy shit, o
Re:my choice (Score:4, Interesting)
I also like the central server aspect, so that there is one place where the code is located, and I just have to keep that backed up.
Nothing wrong with that, if it's effective for you and your team, and clearly svn wins out over git. Trying to make git within that model is just adding complexity without getting the benefits.
Not true. I hadn't even heard of git one month ago, but we just set up a central repository system. Actually we already had a central git repository (on github) before I started working here, but that meant everybody pushed their commits into the same repository, which the guy responsible for deployment to production didn't like: he wanted to keep it stable and only accept changes he approved of.
So now everybody has his own fork on github, pushes commits to his own fork, and the guy merges those forks (branches, basically) back into the main repo. Since merging is trivial, this works out very well. Everybody can access everybody's commits without messing with the stable trunk or making a big mess of things, because git does all the heavy lifting for us.
Having used SVN before, I was very skeptical about git until less than a week ago. Now that I've seen what it can do, I'm a believer.
Re:my choice (Score:4, Informative)
Precisely. I don't use Subversion for managing code anymore because for merging the distributed version control systems are much much better. However, Subversion is an excellent versioning file system, and that's what most people actually want. It handles large files well (try checking a 500M file into git, mercurial or bazaar sometime), and it can even be used as a WebDAV share for completely braindead use by normal end users. End users see the repository as a Network drive, but I can go back and get old revisions easily.
Now that Subversion has more advanced merging abilities it might even be suitable for shops that like Subversions centralized nature but still need to merge on a regular basis.
Besides, mercurial, git, and bazaar all interface well with Subversion. I frequently use bzr as a front end for subversion repositories if I know I am going to be doing any merging.
Integration in common tools (Score:3, Insightful)
Git is not well supported on Windows like Subversion is with turtoiseSVN. There is no good integration in Eclipse or Netbeans. The workflow is more complicated and enterprise tools such as Jira and Confluence do not support it.
These things may improve but right now, Git is not very well suited for use in corporate environments.
Re:Integration in common tools (Score:4, Informative)
The other dvcs Mercurial: Tortoise [sourceforge.net], Eclipse [vectrace.com], Netbeans [netbeans.org]
I don't see, why the workflow has to become more complicated for server-side things like Jira and Confluence: you simply create a automatic server-side conversion from your central dvcs repository to a svn repository for those tools are done with it.
Neck and Neck (Score:4, Funny)
I can honestly say that I have no preference of one over the other; having only just heard of them both by the OP.
Re: (Score:3, Funny)
I can honestly say that I have no preference of one over the other; having only just heard of them both by the OP.
Shut up, Palin.
not 1:1 (Score:5, Interesting)
The most effective use of GIT happens when the team changes its mindset away from the central repository with multiple developers checking into it to a true peer-to-peer development team. I wouldn't switch away from svn until the organization I was with was prepared to "think different" and make that transition. Using GIT like a fancy svn just makes it like a complicated svn, not a better way of doing version control.
Re: (Score:3, Informative)
Why, does that matter? Most of the git work I do there is a central repo. that everyone with privs pushes to. So instead of "svn commit" you have "git push" ... except with git you can create local branches, work disconnected, don't need to give commit privs. out as much, and it's much faster.
Real programmers (Score:5, Funny)
Re:Real programmers (Score:5, Funny)
Real programmers type cat | cc and get it right the first time.
Some of us don't have to cling to safety blankets like that. We prefer the simplicity of cat > a.out
Re: (Score:3, Funny)
Meh. Talk about safety blankets. Real programmers use magnets to set the bits of the executable on the disk manually.
Windows & Documentation (Score:5, Informative)
Linus on Git vs CVS/Subversion/Bitkeeper/etc (Score:5, Informative)
Re:Linus on Git vs CVS/Subversion/Bitkeeper/etc (Score:5, Informative)
Randal Schwartz, the Perl guru, gave a more detailed presentation on git, also at google. It has a lot more meat on its bones, and gives examples of using git.
http://www.youtube.com/watch?v=8dhZ9BXQgc4 [youtube.com]
Linus explains all (Score:4, Informative)
http://www.youtube.com/watch?v=4XpnKHJAok8 [youtube.com]
He might not be very objective and his talk obviously only offers one side. Still, might be informative :)
Go with Bazaar (Score:5, Interesting)
I found the Bazaar system to be superior to all other version control systems I have tried, including subversion and GIT.
http://bazaar-vcs.org/ [bazaar-vcs.org]
Why? It is fast, it has tools integration and it can be used in much the same way as subversion/CVS. It is much easier to learn and just as powerful as something like GIT.
There might be reasons to use GIT for extreme projects like the Linux kernel, but I believe Bazaar will do just fine for all reasonably sized projects.
Depends what you need more. (Score:5, Funny)
SVN is better for Windows users.
Git is better for Git users.
Re:Depends what you need more. (Score:4, Funny)
My problem with CVS is that I keep confusing it with CSV.
So when discussing file formats I can never remember which acronym I should be using, and keep referring to CSV data files as CVS. Age does that to you.
Git, on the other hand, would distract me with thoughts of the "stupid gits" using it. And bzr just makes me think "bizarre".
Mercurial sounds exotic, engimatic. Maybe I'll upgrade to that.
Slashdot - where some stupid git will subvert the conversation by advising you to choose a SCM based on how bizarre the name is.
Git and SVN (Score:5, Informative)
similar thoughts (Score:3, Interesting)
I've been using CVS forever, mainly because it was the only real noncommercial option ten years ago. But I'm interested in trying out any versioning system that will work better, because I know I'm abusing CVS with my file storage needs.
I do a fair amount of hobby coding, so any of the systems work well for that. Thousands of tiny text files are easy to merge. The sandboxes are fast and I can set up my repository on another machine on my lan.
However, I also do a fair amount of semi-professional photography. My sandbox may have a couple thousand binary files that range anywhere from 2 MB to 2 GB. The number of versions of a file may typically go as far as 4 or 5, rarely as high as 10. A new version is best handled by simply snapshotting the whole new binary file, like the old VMS filesystem does. My repository on my lan machine has several tens of thousands of these binary files. My sandbox is rarely complete: I only sync certain subfolders now and then, and when I've checked in my changes and need space, I just erase that area of the sandbox. As long as I don't try to (cvs update -d) at the top level, I'm fine.
I know I may be wrong, but if I switched to git or mercurial, as I understand it, every sandbox is/has its own repository with complete history, and these tools are more interested in how to merge changes from repository to repository. This is not what I want, in that the local sandbox+history would easily bloom into the many-gigabyte range and start to crowd my regular working space. I read a bit about their repository 'packing' options but that's not a solution, it's a maintenance feature.
3d party tools - Trac and Tortoise (Score:5, Informative)
Trac - One reason to use Subversion is the hard bindings you can get with Trac. Nothing enters the repository unless it is tied to a ticket. Ever been to a software process review? This is a must.
With the newer trac versions you can pass the tickets though the review stages and if you just wish to peer-review the code you can do that in Trac without checking out anything at all. Just click on the links in the ticket and you see a diff of the source in the webbrowser.
Tortoise - integration into Windows desktop. You can immediately tell by looking at the folder icons what needs to be checked in. Right click on a folder and select commit or update etc... For some reason this tools is so much better than anything on Linux...
Does it matter? (Score:5, Interesting)
The truth is that despite the amount of invective on the subject, the choice of source control tools is not going to have any measurable impact on your project. Hell, most projects could easily run without a problem on a non-buggy version of MS-SourceSafe (if such an animal existed).
The biggest cost you're going to have with your source control package is the initial setup. The biggest benefit you're going to get from your source control package is going to be minimizing that cost. Choose any of the modern source control packages and just get on with what you're being paid to do: write code.
I have considered Git but... (Score:3, Interesting)
There is nothing wrong with git. I just don't see a clear advantage to it. In every argumentative paper I have seen about git vs svn, they always tout the above "advantages" of git. These items don't translate to actual advantages during project work, in my experience. If anything, the multiple local repositories all over the place, would seem to me, to cause more wasted time trying to merge in changes to the central repository, because of the local git repo's having a tendency to allow themselves to get so out of date.
The main reason I use svn still, is because I learned it first, it does not have any disadvantages, for me, when I compare it to get, and it is well supported, and has a large developer base.
Re:I have considered Git but... (Score:5, Informative)
svn has no merge tracking. That's a pretty crucial feature.
Resolved since SVN 1.5, merge tracking has been added!
How about GIT vs Mercurial ? (Score:3)
The DragonFly project is planning on moving out of CVS and has been looking at various repositories. We aren't actually interested in Subversion per-say, not any more, but some of our developers have used GIT and a few are advocating for mercurial as well. We need to come to a decision by mid-november.
I haven't used Mercurial yet myself. I have used GIT. It took about a week to get used to it but once I understood the contextual labels things became a lot more obvious. We will maintain our central repository either by having it pull from the individual developer's repositories or by having the developers push into it. I'm still not quite sure what the best methodology is. It has to be automated no matter what.
If someone is using GIT in a similar manner I would like to hear your story.
I would also like to solicit opinions from people on GIT vs Mercurial.
-Matt
mercurial (Score:3, Interesting)
RCS os OK for very small projects (Score:4, Funny)
What size is your project? For small projects with one to three people who all work in the same place yu can use RCS. It is serverless and works inside the file system. For many years I simply NFS mounted the RCS directories onto the development machine. There is almost zero setup and very little learning curve.
CVS was a server centric RCS. If you don't need a server because you are the only developer on the project RCS is everything you need
I also use RCS for all those small 8.conf file in /etc. just do a "mkdir /etc/RCS" and you are setup and running. It's that easy.
They don't exist (Score:3, Insightful)
There is no such thing as a "die hard" subversion fan. People use subversion because they already use subversion. Not because they are fanatical about their choice. Which sets them apart from people who go for Git, Mercurial, etc. it puts subversion people roughly in the same group as CVS people.
It's hard to be fanatical about the philosophy of "if it ain't broke, don't fix it"
Easy (Score:4, Interesting)
Git vs. SVN is more of a philosophical argument than a technical one. Git encourages disconnected operation and independent work more, while SVN tends to pay off the most if you're working regularly in lockstep with your team and everybody has a clear picture of what everybody else is doing. Not that you can't work on one kind of project with the other software, but it's more painful.
There are bona fide technical issues you'll probably encounter no matter which one you pick, but those issues are trivial compared to the productivity you'll gain/lose by choosing the right one for your project and your (team's?) way of working.
For you specifically, since you work with Rails, use Git. Everybody else is now, so it'll make dealing with other Rails developers easier. Most of the junior Rails folks we looked at recently (and haven't hired) are familiar with Git but not SVN.
For everybody else, if you're a solo/freelance developer working by yourself, the choice doesn't matter at all. You don't really run into the major differences between the two until you start collaborating with other people.
GIT is great, but it requires learning (Score:3, Interesting)
We've been through CVS, SVN and finally GIT when developing our code internally for a big open source project before opening it.
Git actually requires changing the mindset for developers from producing the code to producing the patches.
This is an excellent description from one of my colleagues and I think that Git is ideally made for making patches. Patches are what are valued and needed in the open source world while it is still often different for the corporate inner projects.
When we were going to open source the code and understood that we'll have to behave like it is done in the open source, send patches to committers, Git became a natural choice although the central repository of the project is in SVN (Apache repository). Developing patches is different from developing the code in a small sized team. Git offers absolutely the greatest power to operate with code changes (patches) locally than any revision control that I've seen.
The article misses a tremendously useful feature of Git called "rebase". It is useful when you develop some changes against a trunk that changes while you work on your code locally. You make some local commits and to make them synchronized with the current state of trunk it is necessary to rebase them on the new version. Git does it by far in the most convenient way I've seen applying all of your local commits one by one and asking to resolve conflicts when it is necessary. Of course it requires some discipline to commit locally in small portions, but it is easier than "merging often" with the trunk of development than subversion handbook says. Merging is often tedious and it is way easier to just commit small changes to a local repository than every time resolve the same conflicts when "merging often". You never have to resolve a conflict again after you've done rebase with Git.
I didn't find performace on windows so bad. Cygwin port works ok, not so fast as on Linux, but it is good enough compared to subversion update. TortoiseSVN has to keep a separate cache to make windows performance decent. This cache is sometimes renewed and slows down a system for a long time if your checked out repository is big enough. All of subversion transactions like "svn log" require server interaction while Git is lightning fast. So I think even if filesytem performance of Git to clone or checkout may not be so good on Linux it is compensated with no delay to do every day commands like log, annotate, diff, etc.
Re:go with Perforce (Score:5, Insightful)
>Note that Perforce is free for open source projects.
Yeah, so was BitKeeper and that used to really work too.
Re: (Score:3, Interesting)
The only thing distinguishing the commercial VCS tools now is their integration with the likes of project management and issue tracking tools, and possibly the ease of getting a support contract (for those organisations that just have to have someone to blame).
None of them can compete with the next-gen DVCS systems in terms of performance ; Linus Torvalds notes that BitKeeper used to take about 10-15 seconds to merge an emailed patch to the Linux kernel, an "order or two" of magnitude faster than anything e
Re: (Score:3, Interesting)
Ugh. I've used CVS, SVN, Perforce, Darcs, and Git over the years. Perforce was far and away the worst of the lot.
Whose bright idea was it to make the clientspec an unversioned artifact? In the company that I used Perforce at, which shall remain unnamed, it took me two weeks just to assemble a clientspec that would give a checked-out version of the repository that would actually build. Every developer in the place had their own personal flavor. What a ridiculous nightmare that was.
Git is far and away the bes
Re: (Score:3, Informative)
Re:CVS all the way baby (Score:5, Informative)
Re: (Score:3, Insightful)
CVS > SVN (Score:3, Funny)
I'm normally all for newer better systems, but I have to agree... CVS > SVN because of branching/tagging.
So, wait... You're running CVS and directing its stdout to a new file "SVN" in the current directory?
Or are you saying CVS is a higher-valued number than SVN? Couldn't you simplify that and say C > N? I suppose that's only safe if you assume S and V are non-negative and that complex numbers and matrices don't figure into this...
Re:flamebait (Score:4, Funny)
Re:flamebait (Score:4, Informative)
Re:My own opinion (prob. very controversial) (Score:5, Insightful)
You've obviously never worked on a programming team.
The best reason to use CVS or Git is the situation where multiple programmers are touching the same file(s) at once and you need to both commit. Also, the blame tool on SVN lets you easily tell when any given line of the code was added and why (see the commit message). The SVN repository I work on professionally has well over 25K commits...try managing that with a bunch of copies and text files!
(I've done the versioned tarballs for a project I worked on alone...never again!)
Re:My own opinion (prob. very controversial) (Score:5, Funny)
Re:My own opinion (prob. very controversial) (Score:4, Interesting)
You can leave comments on snapshots with versioning filesystems? I'm asking, I really don't know, haven't ever dealt with them, but any version control system that doesn't have comments is nearly worthless to me. I really need to know why my developers make a change as looking at the code for a bunch of changes across several files does not always result in the clearest picture of a change if you don't have some idea of what the goal was.
The commit comment log is priceless to me, but then again, the developers I work with are pretty good about making small changes and committing often with useful and informative comments. We try to avoid large commits that change lots of files, and when we have them, we generally warn everyone in advance that its coming and to be prepared for it so as to make merging things together a little easier. If everyone knows its coming, they tend to work together to make the merge smoother and make sure things work well together.
Re:svn == unpleasant and maybe buggy (Score:5, Informative)
Subversion usability leaves a lot to be desired (although the book is really nice). For example, cd into a working copy that you've never seen before and try to determine its exact repository URL.
Uhh, ok.
$ cd tortoiseSVN
$ svn info
Path:
URL: http://svn.collab.net/repos/svn/trunk [collab.net]
Repository Root: http://svn.collab.net/repos/svn [collab.net]
Repository UUID: 612f8ebc-c883-4be0-9ee0-a4e9ef946e3a
Revision: 33826
Node Kind: directory
Schedule: normal
Last Changed Author: hwright
Last Changed Rev: 33826
Last Changed Date: 2008-10-21 15:16:27 -0500 (Tue, 21 Oct 2008)
That was tough. I think I broke a sweat.
Re:Keyword: Herd (Score:5, Insightful)
I like to use git because I find it easy to make a branch for testing out some new code, and easy to merge the branch into the trunk if I want to keep it. Here are some aliases I wrote that cover pretty much all the git I use. If I decide to change version control systems, I can change the aliases. alias vca='git add .';
alias vcb='git branch';
alias vcc='git commit -a';
alias vcd='git diff';
alias vcm='git merge';
alias vco='git checkout';
As for choosing between git and subversion, why not try both? It's pretty unlikely that somebody will tell you what you like best. You have to find out for yourself. Considering that they are free software, easy to install, and pretty easy to use, you can try both and see if one of them seems better to you. I tried both, and I chose git. But I don't mind if other people use subversion, RCS, SCCS, or whatever they feel like using.
Subversion and git have different models. Subversion has a client-server model with the repository accessible by http. Git uses a distributed model, with each user getting their own copy of the repository, and the possibility of merging things from one repository to another. This might make git work better if the users' computers aren't always able to connect to a remote repository.
Try them both, see which one you prefer.