News for hackers. Stuff that matters.
Re:3 reasons to switch to git by axod on Wednesday October 22, 2008 @02:23AM (#339792)
"You’d like to work on each of your 4 features A, B, C, and D independently and somewhat in parallel, though B looks like a quick win."

Does anyone here seriously work like that?

Seems like git has some advantages if you branch a lot, but I don't think branching too much is particularly healthy. I can see why it's good for open source if you have a ton of contributers, but what's the win for a small team who hardly ever branch?

Re:3 reasons to switch to git by astrec on Wednesday October 22, 2008 @02:48AM (#339809)
I don't use git, I use bazaar - but yes, I often work like that. Why? Sometimes my headspace fits one class of problem better than another, other times I might want to push a largish patch early to another team member, sometimes you want to break a lot of stuff as is often the case with exploratory programming. Short lived branches can be very handy.
Re:3 reasons to switch to git by mojombo on Wednesday October 22, 2008 @05:10AM (#339861)
I do this all the time on the GitHub repo itself. I'll have an idea for a small tangential feature (like per-repo pageview stats) that I want to spend an hour hacking on to see if it goes anywhere. By branching off master, I can experiment to my heart's content and then just shelve the feature easily if I don't finish it. Then later on, getting it back is just a single command away. Git really is a hacker's best friend. It facilitates exploration and experimentation of code. Fits perfectly with a startup mentality.
Re:3 reasons to switch to git by timr on Wednesday October 22, 2008 @12:48PM (#340226)
You can branch and merge easily with SVN, too. What does Git add, other than the ability to do it locally?
Re:3 reasons to switch to git by pjhyett on Wednesday October 22, 2008 @03:21PM (#340432)
"You can branch and merge easily with SVN, too."

That's the nicest thing I've heard anyone say about SVN ever.

Re:3 reasons to switch to git by maw on Wednesday October 22, 2008 @09:03AM (#339969)
Does anyone here seriously work like that?

Sure, why not? I create a branch for nearly every series of edits (aside from tyop-fixing bugfixes) that I do, usually to fix a bigger bug or to create a new feature. If it works out, great: I merge it into the master. If it turns out to be a dead end, or is taking too long, I can delete the branch, or just put it aside with the intention of rebasing it later.

...but I don't think branching too much is particularly healthy.

Again, why not? Ignoring for the moment problems which are social at their root and not a dvcs' fault, most likely either you're creating lots of dead ends in those branches, which isn't such a bad thing because it also means that you're also trying out lots of ideas and exploring the problem space; or you're merging those branches, so you're doing good work and getting it integrated into the project.

Re:3 reasons to switch to git by nihilocrat on Wednesday October 22, 2008 @09:50AM (#340011)
I think it's considered unhealthy because it's another layer of complexity you have to deal with, and a many-branched environment without any system-enforced meta-structure can result in huge amounts of confusion when things don't go right. You have to train your team and trust everyone to avoid all human error. Example: "whoops, I just merged a bad branch into the master one, but I just left work for the day and I don't find this out until tomorrow morning, let's hope no one checked it out in the interim or we're boned!"

With a centralized VCS (or more specifically a single- or few-branched repo), you just tell people to checkout code, commit their changes, and you're done. There are less places to screw up because you don't have a bunch of branches you have to manage. You are less flexible, but this lack of flexibility only becomes a huge burden in a truly distributed (i.e. open source) environment.

It's sort of like arguing static vs. dynamic typing. There are many cases where dynamic typing resulted in very painful errors because some variable along the line didn't follow the "gentleman's agreement" that it should be a list and not a string. Though dynamic typing is more flexible and powerful, sometimes you just succumb to human error because the computer trusts you.

Re:3 reasons to switch to git by arockwell on Wednesday October 22, 2008 @10:43AM (#340057)
SVN doesn't do anything to stop people from committing a bunch of boneheaded changes to the repository either. Maybe its a harder to do by accident, but in practice I don't see that as much of a problem. Also, if if someone does commit a bad branch to the repository in git it can easily be rolled back.
Re:3 reasons to switch to git by timtrueman on Wednesday October 22, 2008 @03:46AM (#339825)
Yes. At work we've got several small teams (sometimes just one person), and each work on their own branches (basically, there's release branches and branches with shared content too). With a single team or just a handful of people this may seem crazy but honestly not branching often just doesn't scale well beyond a certain number of engineers. So you're right, for a small team it may not be worth it. Yeah it's easy to lean across the table and tell your cofounder they broke the build but I'd still say it's a good habit, since you can always launch versioned code and not include any unfinished features (and potential security holes).
Re:3 reasons to switch to git by LogicHoleFlaw on Wednesday October 22, 2008 @12:19PM (#340189)
At work here we have separate branches for each major feature release under parallel development. There's another branch for any high-priority fixes going into production outside of the normal release schedule. There's a lot of merging going on cross-branch and git would make this whole structure much easier to follow. We're using CVS and honestly it's a huge pain for our workflow.