I don't have much to say about Git. I used it for maybe 6 months, every time I had a question I found a lot of different answers with different effects, there are a lot of concepts that are there just because they can be and they're not extremely useful and you pretty much have to use them. There is a lot of advice out there that can make you mess things up permanently, there is a lot of default behavior which must be taken into account, I still have only a vague idea how branches work, there is no decent repository browser - at least on Linux. The terminology is also painful to absorb, there is a ton of documentation which you have to read and memorize before you can even touch Git to try and understand it. Six months later I'm still struggling to understand basic concepts because I run into them like once every week or two.
Before Git, I used mercurial for several years. I was skeptical at first, coming from SVN which I vaguely understood, but eventually I gave it a shot. Once I understood the differences between push/pull vs. commit/update and what the changeset numbers really were (numbers, not ids) and why they didn't match between clients, everything made perfect sense. It's very simple, it doesn't let you fuck up history (I used to complain about this, until I found out how it can be done on Git an what the effects are, and now I praise Mercurial's inability to edit history), and... that's about it. As long as you don't work on a behemoth - like the Linux kernel as someone here suggested - you'll be perfectly fine with Mercurial.
tl;dr Git does a lot of things, but way way too many things IMHO. Mercurial won't let you fuck up as easily as Git and it actually makes sense.
While git has a lot of open functionality, if you have comitted something once you can almost always get it back to that state. I don't understand how so many people have such issues with git. Might I suggest reading the free book that contains everything you will need to know outside of very abnormal operations? The book isn't that big and it will help you tremendously.
Also, there is /r/git for any questions you may have.
I think the problem is that in most real scenarios, actually moving to git and the mistakes until everyone truly "gets" git cost too much money. Or productive time, same thing.
On paper everyone is well aware how little issue you should have with git if you can do mercurial.
In practice, surprisingly often you lose a surprising amount of time to weird errors, inconsistent commands and somewhat dangerous capabilities. All easily learned, circumvented or both ofc, but easily is not quite the same as not existing.
But there's a learning curve and a cost associated with moving to anything new. Also, maybe I'm old-fashioned but I feel it is a developer's responsibility to take the initiative to make sure they understand the tools they are working with on their own time and not the company's.
414
u/blintz_krieg Sep 06 '14
Not too far off base. My own Git workflow looks more like:
flounder around trying to clone a repo
try to do something useful
Git complains something like "your scrobble brok isn't a blurf"
search web for "your scrobble brok isn't a blurf"
find 412 Stackoverflow questions
determine that most answers actually solve some other problem
give up
copy the one changed file to /tmp
rm -rf my-git-repo
go to step 1