Live data from Hacker News

Poll: Version Control

news.ycombinator.com

11–20 of 92 posts

Re: Poll: Version Control

#11
post #4

i'd like to know why people are using what they are. did you pick git because you just recently started using version control or was there really something you needed in it that made you switch? i've been using cvs for about 10 years now and have no reason to switch to anything else. it does what i need without any extra fluff, all my projects are in cvs, and the majority of the projects i contribute to use cvs.

For new projects I'm using git rather than subversion. I normally develop on my desktop system, but when I'm on the go I use my laptop. Subversion isn't useful for that kind of scenario if you don't have constant internet/network access. With git I can do commits, look at the history, etc. even when I'm on my laptop and offline. (you can keep copying the whole repository with svn but that pretty much defeats its purpose)

I'm pretty new to git though, and I haven't even touched the more advanced features.

Re: Poll: Version Control

#12
post #4

i'd like to know why people are using what they are. did you pick git because you just recently started using version control or was there really something you needed in it that made you switch? i've been using cvs for about 10 years now and have no reason to switch to anything else. it does what i need without any extra fluff, all my projects are in cvs, and the majority of the projects i contribute to use cvs.

I switched from CVS to SVN because I needed to rename a bunch of directories, and that's so incredibly painful in CVS that I might as well start a new repository.

I switched from SVN to git because I needed to work offline for a week, so I gave git a try (initially, I had my project versioned under both systems) and liked it so much I stuck with it.

Re: Poll: Version Control

#13

Multiple daily backups produced by rsync using hardlinks works well when revisions are too drastic and frequent to give a meaningful history. version control will just get in the way of one or two people drastically refactoring a young project.

I have to respectfully disagree here. Having super-lightweight branching and local commits has helped me greatly, even in the tumultuous early days of a new project. Basically, it gives me the freedom to create a branch, hack for a while, and then either pull the changes into the trunk or abandon them, while still keeping an easy "bookmark" in place (a.k.a. the branch itself) to go back and review later.

Using rsync may offer a history of your code, but without any associated semantics, you're dependent on your own memory and grep to actually find out why a change was made. Making commits intentional, and associating them with a particular task, will greatly simplify your code archeology later. Rest assured, some day you will need to figure out why certain decisions were made, and your memory won't be complete (if it was even you who made the decision the first time).

Furthermore, adding a ticketing system from day 1 really helps impose a useful type of discipline onto your process. Work to be done is described in a ticket, and the ticket identifier gets referenced in your commit messages. Much like basic version control discipline, having a record that associates change requests with units of work will help keep you sane down the road.

Re: Poll: Version Control

#15

Multiple daily backups produced by rsync using hardlinks works well when revisions are too drastic and frequent to give a meaningful history. version control will just get in the way of one or two people drastically refactoring a young project.

FWIW, multiple backups and hardlinks are the basic foundation of git. Running 'git commit -a' a few times a day to check in all the changes isn't a big timesink; commit messages can take time or not depending on how detailed you care to be.

I've has some personal projects that were 'moving too fast' for version control, or that I was just playing around with. In every case I ended up losing code because I couldn't remember how I'd done something I'd later removed. And I've never had a project with more than one copy of the codebase -- whether that's a local dev and a production deployment, or two devs -- that didn't end up overwriting code or config at some point.

It's not surprising that version control, largely useful for history, does not appear to be immediately useful for a young project. But young projects become old projects with the same habits and practices. Start with good ones.

Re: Poll: Version Control

#16
post #13

Multiple daily backups produced by rsync using hardlinks works well when revisions are too drastic and frequent to give a meaningful history. version control will just get in the way of one or two people drastically refactoring a young project.

I have to respectfully disagree here. Having super-lightweight branching and local commits has helped me greatly, even in the tumultuous early days of a new project. Basically, it gives me the freedom to create a branch, hack for a while, and then either pull the changes into the trunk or abandon them, while still keeping an easy "bookmark" in place (a.k.a. the branch itself) to go back and review later. Using rsync…

> create a branch, hack for a while

$ cp -R project testbranch

> then either pull the changes into the trunk or abandon them

diff or rm -rf. And none of the nuisance of explicitly telling the VC system when you're adding, deleting, and renaming files.

Re: Poll: Version Control

#17
All projects right now use Subversion except one new project at home that I decided to try Git out with.

All projects at work though use Subversion for now, but I am the only developer. (Just makes it easy to revert incase of issues as our system deals with a lot of numbers)

I like Git .. it's very fast and simple to use :)

Re: Poll: Version Control

#19
I know from experience that git is superior, but I still use svn because it is the (modern) Lingua Franca of revision control. TortoiseSVN on Windows also gives it a definite advantage on that platform.

Re: Poll: Version Control

#20
Can anyone with experience with both SVN and Git comment on the pros/cons of branching and merging (this is something I do often in Perforce). Which would you use based on this one issue?
Post reply on HN