Live data from Hacker News

Still hatin' on git: now with added Actual Reasons

reprog.wordpress.com

1–10 of 169 posts

Re: Still hatin' on git: now with added Actual Reasons

#2
1) "pull --rebase" might help with one of the particular problems mentioned (though obv. not appropriate for all occasions)

2) More broadly: yeah, if you expect it to work Just Like Things You Already Know, it just won't work out for you. It really is a totally different workflow, and it either works for you, or it doesn't. Empirically, it works great for many people/organizations (though, absolutely, not without some trade-offs). But truthfully, yeah, if you're a single developer, disinclined to use some of the niceties and very interested in maximizing simplicity/reducing keystrokes... svn really may be a better fit.

Re: Still hatin' on git: now with added Actual Reasons

#3
> So I edit the file, fix the trivial conflict, and git commit filename.

This is a bit vague, but I'm guessing you mean you open up the file in your text editor of choice and edit it directly.

What I do these days, probably originally prompted by exactly the sort of frustration you describe, is to run "git mergetool", which I happen to have configured to fire up emerge, but you can use any of a number of tools. Once I'm done, git is happy and I can just push. Initially I was a little grumpy about learning how to use emerge when before I just edited the file with all its >>> directly, but after learning the tool, I wish I'd been doing conflict resolution this way back when I used CVS and SVN. It's really much nicer and less error prone.

So, I hope that's a helpful hint. You're absolutely right about a lot of the unhelpful & unintuitive messages and commands.

Re: Still hatin' on git: now with added Actual Reasons

#6
Someone needs to introduce this guy to the concept of rebase and then maybe he'll get on board with branching. And then maybe some of his problems with be solved. I used to have these issues until I started branching and rebasing off a core "develop" and "master" branch.

Re: Still hatin' on git: now with added Actual Reasons

#7
Duh. I've never got the hang of git either, but I figure git is for those people who don't get enough mileage out of Mercurial because they have 42 megatons of source code, or need git rebase, or just want to shock and awe their friends. But no need to hate git for that. No one's forcing you to use it. You don't like vim? Go ahead and use emacs/gedit/eclipse/perl. You don't like git? Use mercurial. Or subversion, if it makes you happier. Merging is always a pain with VCS, more so with DVCSs because they let you conveniently forget a bunch of patches in that repository copy on the USB stick in your back pocket . And these long mumblish version numbers are also going to stay - but they're not so bad when you use a graphical repository browser (hg view/hg_web/git-web/tortoise).

And if you just need versioning for a couple .doc files: use Apache's mod_dav_svn and be done with it (i.e., you can mount it as a directory in Nautilus or the Mac finder and it just works). Even though I like all the fancy stuff in Hg, I started using it and never looked back because it's always been painless. (Oh, and you can work directly* on the repository, version history is mostly useless because it reflects weird program behaviour including temporary files, but you'll never get any conflicts unless you mess up really badly).

Re: Still hatin' on git: now with added Actual Reasons

#10
Don't give up faith my friend. Git and mercurial are not the end of the story.

I'm optimistic that, within another few years (give or take a decade), someone will come up with a VCS that's both powerful and usable. :-)

Other than that: I enjoyed your article. Very nice walk through some of the problems and hair-pulling that I'm going through regularly, too.

Pro-Tip: My life with git got a bit easier since I keep this big bucket of paste-ready shell-snippets near my terminal window. You know, those handy little 14-liners that look like line-noise at a glance, but get you out of "situations" when chanted.

Post reply on HN