Hacker News new | ask | show | jobs
by the_af 4296 days ago
What are the improvements of using git over darcs? Do you miss anything from darcs?
1 comments

Darcs doesn't support branches—it's just a collection of patches in every repo. Our Darcs project was set up with a "dev" repo where we'd dump everything and then promote patches to "beta" repo and then the "production" repo. The downside was that "dev" was filled with a lot of dead end patches that needed finishing/fleshing out before they could go to production. In git, those are now on separate branches and so the main development line is much cleaner. We could have done that with Darcs, but it would require multiple repos (one for each branch), both on the server and on our development machines (yuck).

The first thing we did after converting the Darcs repo to Git was to run a complicated rebase script that split all the dev repo patches into logical git branches. If you looked at the Git repo at that point it would be a single linear set of commits which then explodes into 14 or 15 different branches all at the same point.

Since then we've been using feature branches to do our development and Git really helps to keep distractions to a minimum. "git stash" and feature branches mean that random stuff I am trying is filed away neatly and doesn't pollute my working directory like it did when we were Darcs based.

Honestly I don't really miss anything from Darcs. I could fib and say Darcs's cherry-picking is better than Git's, but while that's true, I don't really cherry pick much in Git (it's usually only to fix accidental checkins on the wrong branch) and so I don't hit conflicts often (at all, really).

Darcs allowed us really simple deployment (we'd just push our patches to the live server—not the cleanest, but oh so easy). Git required us to write a hook that deploys when we push to the production branch. However, that was actually a blessing in disguise, since now the hook can do good stuff like reload the server when the code changes and rebuild static assets as appropriate. We used to just do that by hand.