by compay · 14y ago · 0 comments
Now I'm freelance I've had the time to put into learning Git and I'm glad I did, but the point is there are still a lot of people using SVN, some of whom will switch to Git in the future, and posts like this can be very useful to them.
How true this is. I spoke with one sysadmin who told me that even if 100% of the developers were using git-svn he would never allow git as the official location to store code on the servers and it must be pushed back to svn. I am not sure how to respond to people like that.
Edit: When pressed for more details it was clear that he was happy with his svn server setup and didn't want to change and have to learn something new. This was not a logical discussion, but an emotional one and as he ran the servers he had the final say.
Resistance to change might be an authority thing - you could just walk around this troll's bridge and see what happens. Try talking to his boss or higher about source control, casually. If his manager asked him to change to GIT he would do it. He might have dismissed you because he believes you're not in a position of power over him or the work required to switch is mundane.
Thing is, I understand svn. I get it, and I have used it for years and know, almost instinctively now, what will happen when I use the various commands.
Git for me just feels overly confusing. I suppose it's just because I'm used to "the old way" but just take a look online at how many articles that are out there trying to explain how git works. Why are so many needed? It feels like there are many more than there are explaining how svn works.
By the way, I can see the benefits of git and I feel I'm getting the hang of it quite well now, but I still like svn :)
It's not really that hard to learn btw. There are some esoteric things that can be tricky but the Svn workflow can be learned in a day or two tops.
Perforce seems to be entrenched in more corporate environments.
Did you experience some of the issues Facebook has?
See:
http://thread.gmane.org/gmane.comp.version-control.git/18977...
Setup 1 exploites this. This would be movie companies were every version of every rendering is in Perforce. On the server you have easily many times even the size of the desktop hd, and users only grab what they need/want. These companies should stick with Perforce.
Setup 2 came about from laziness. Everything was dumped into the repo with no organization. Converting it to git will require a XXXGB repo which while manageable windows can't handle well. You encounter say dozens of copies of the binary sprinkled around inside of the source directory (not even revisioned, just copied with the version included in the file name). Need a copy of every Windows NT CD's stored somewhere? Why not in the src directory!?! Once you cleanup/split this the src repo goes down to a usable size.
After the above basic cleanup (which honestly can/should have been done in svn/perforce anyway.) the src repo can still be a large size because the src isn't the src for one project, but maybe dozens or hundreds of projects that compile to one binary (or some similar setup such as lots of little binaries that are one product). It is then up to you to decide on how you want to proceed. There are a few different approaches with different pros and cons and situation specific. (And discussing them is really a full blog entry not a random hacker news comment).
I'll leave you with my law about repo size: When every developer in a company is committing to the same branch the odds that a commit will break the build increases as more developers are hired.
Edit: simplified
Install TortoiseSVN. Done.
Install TortoiseHg. Oh it needs something else. What's it called? Ok. I need msysGit. I'll get that. Ok, they're all in beta? Whatever I'll just get one. What? It runs on top of Cywin? And on, and on...
Am I missing something here or is it really that convoluted? I work with non-programmers (engineering types) who program and I need it to be easy for them. Any recommendations?
(Just pointing out because TortoiseHg actually is fairly painless to install if you want to use Mercurial on Windows, and the typo might confuse some)
Just because you are an elitist hipster hacker, doesn't mean that this issue will only pertain to staid, conservative companies.
So git is worth switching just for branching/merging superiority? Maybe I don't do it enough, but svn has never let me down. Or maybe I'm not on a large enough dev team?
Guess I'm really just trying to figure out if git is so amazingly better that I really am under a rock (I'm not seeing that), or if it's more of the "if you're not using {latest hip tech} you're not to be taken seriously" kind of thing that we see so much on HN.
(sorry about new account -- can't find original credentials)
I wish I had time to get in all the details about why git is better but I will leave you with two questions to ask your existing version control system:
1. How fast is your version control system?
Unless you have tried git, you will not realize how painfully slow SVN (or any other VCS which has to talk to server) is. 90% of my git operations take less than a second.
Now, you may say that 'speed' is not an issue. Trust me, it is. Once you have a super fast VCS, you will embrace it as your friend in everyday coding instead of using it at the end of the day. It's something similar to what Google thinks that making website/webapp faster brings in more users.
2. Can your version control handle renames?
There are very few version control systems out there which can handle renames. If you dread renaming files because of SVN, you ought to look at git. BTW, not only can git handle renames without a hitch, it can show you code history across file renames.
Again, you may think that 'renaming' is not an issue. But if you believe that 'naming' is very important for your code and you do re-factoring all the time, you don't want your version control system to dictate how you work.
I can imagine why one may think that git is fad. But after using it for 2 years now, I can not use any other version control system. [And for a background, I have used following version control systems for real proejcts: CVS, VSS, Perforce, Surround SCM, SVN, TFS.]
1) Fast enough? I have tried git. It's pretty cool, but the difference between 5 seconds and 1 second is minimal at best to me. I don't think I've found myself dying for a faster SCM, though I usually make maybe 1 - 5 commits per day. Git on Win32 is meh compared to git on Linux, so that doesn't really convince me any further either. Git is also a PITA to compile on !Linux using !gcc, because heaven forbid we write using ANSI/ISO C.
2) Yes? I can do renames, but strictly speaking it is not an atomic "rename" operation. I don't particularly care about rename history, and I'm not really sure why others do, but I guess if I tried I could make up a use-case for it. Still, it wouldn't be a selling feature for me, that's for sure.
It seems strange to me that you take the time to tell us that "git is better", like we're comparing O(n) to O(log(n)) algorithms. Different workflows, projects, and organization structures have different needs. It seems hopelessly naive to simply assume everyone's needs are best fit by git, and git alone.
How about this: I want to tell, given two revision numbers in the mainline branch, which came first? In SVN, it's pretty simple. In git? Well, first open a terminal...then ...argh. As release manager, it's kind of annoying. Simple use case: is 2aa8aca05357004d4418807c06f53d81517bc629 before or after e8d0555ce401b6acb0f225aa0263e9b72136347d? Did e8d0555ce401b6acb0f225aa0263e9b72136347d make it into the build given that 5b5c73ceaa442bafff08b4470aad3ff276be94e3 was the final commit before the cut-off?
I might waste 5 seconds opening a terminal window or tab, 30 seconds finding, copying, and pasting the revision numbers, then a second or two determining the answer. This, to me, is not a productive use of my time when revision numbers simply tell me what I need to know. All of that magical time git just saved me might have just been absorbed or gone into time debt.
Btw, SVN supports partial checkouts (git doesn't). Which I use regularly on a gigabyte repo.
I use git regularly for all my hobby projects (mainly because 'git init' seems way simpler than the equivalent svn command), and I might even start a company off on git, but I'll never claim that SVN is obviously a bad way to do things.
But, at the end of the day, I rename files so infrequently that it's hardly a selling point or problem on either system.
Of course you still need some centralization in order to share work with other people. But the more compelling thing about Github is forking, not centralization. With Git you can easily synchronize commits between multiple remote repositories.
There's also the benefit of being able to checkout just one folder of the project wherever you want without having to keep the same folder structure as the source project. I understand git is able to do a "sparse" checkout now, but the parent source folder structure is checked as well.
I've never had to use svn myself, but it's this aspect that's always sounded positively crippling to my workflow
At the end of the day, use what works best for you. If you want to test the waters, use git-svn. You can then work locally and then dcommit your changes when they're ready to go upstream. It'll give you a pretty good approximation of what git can do for you workflow-wise.
apparently there was enough interest to bump it to the front page.