News for hackers. Stuff that matters.
Re:Why is git pull considered harmful? (2013) by phillmv on Wednesday March 12, 2014 @10:48AM (#7385891)
That's a false dichotomy. Matter of fact is there is no right way to use git, because the way you use git is going to change according to your organization size and complexity.

The Linux kernel is a very different animal than your average rinky-dink hobby project, which is different from your ten-dev consultancy.

Matter of fact is: the git UX is awful and it punishes everyone who doesn't have have a high level understanding of how the underlying persistence model works.

Re:Why is git pull considered harmful? (2013) by sethrin on Wednesday March 12, 2014 @01:12PM (#7386869)
> Matter of fact is: the git UX is awful and it punishes everyone who doesn't have have a high level understanding of how the underlying persistence model works.

I believe this is true, but reading through a description of how the underlying persistence model works was for me a revelatory experience. This was presented together with a description of the precise problem git was designed to solve in the O'Reilly book, Version Control with Git. It seemed to be a problem solved in every particular -- an exact solution, that rarest of all things. I did struggle with git before I read about it, which is why I picked up the book in the first place. Since then I have convinced myself that any failures with git are due to my own deficiencies and not its, but my tasks with git are far from exotic; I rarely encounter any difficulties.

The value in the software is not so much the UX, which I consider acceptable (at least with aliases), but in the underlying data model. For me, it is a tool of daily use, and so the knowledge required to use it is a trivial investment. If we were discussing something other than a command-line tool, I think I might be more amenable to the argument that a simpler UX is a better one. With the CLI though, you pretty much need to know what you're doing before you attempt to do it, and any problems with the process are rarely considered UX issues.

Re:Why is git pull considered harmful? (2013) by johnbm on Wednesday March 12, 2014 @02:14PM (#7387258)
Isn't it a problem then that Git does not expose or visualize its internal model in any comprehensible way to its end users? That and the lack of instant undo seem ridiculous for a program designed to manage change.
Re:Why is git pull considered harmful? (2013) by sethrin on Wednesday March 12, 2014 @05:49PM (#7388627)
It has a steep learning curve. It is not optimized for novices. In my opinion, it does exactly what it should do internally, while I consider other tools to be deficient in some respects.

In the common case, undo is provided by git commit --amend. For anything more complicated, I don't think that there is an explanation or GUI which could be considered "intuitive". I've used gitk and git-gui, and a variety of other visual interfaces before Reading the Figurative Manual, and while I'll be the first to cry my own ignorance, I have not found any of them to give much information about even the available options. What is cherry-picking? What about reverse cherry-picking? When would you want to use either?

It's not impossible to design a user interface which would translate all of git's graph manipulations into a simple visual system. However, its current textual interface is extremely flexible, and it exposes a very useful scripting interface. It is a tool that rewards knowledge and experience, like emacs or vi(m). Which is not to say that it's necessarily a good value proposition to you, but it is (imo) a good time investment. One of these days I need to invest in vim too :(

Re:Why is git pull considered harmful? (2013) by johnbm on Wednesday March 12, 2014 @09:18PM (#7389565)
Eh? "Git undo" should restore the state of the repository to what it was before I typed the last command. How is this not the simplest and most intuitive implementation of this feature?

Unix geeks, you make my head hurt with your stockholm syndrome.

Re:Why is git pull considered harmful? (2013) by to3m on Wednesday March 12, 2014 @05:34PM (#7388559)
gitk --all is excellent for this. I didn't really fully understand what git rebase was for until I worked through a few tests on my repository, refreshing the GUI after each command I typed.
Re:Why is git pull considered harmful? (2013) by jheriko on Wednesday March 12, 2014 @11:33AM (#7386184)
> Matter of fact is: the git UX is awful and it punishes everyone who doesn't have have a high level understanding of how the underlying persistence model works.

that is very true imo. reverting a merge once its pushed is a real headache in git compared to mercurial and its caused me problems often enough at critical moments that i simply refuse to use git

it can solve my problem but even 'experts' who like to tell me how to do it and how 'easy' it is seem to miss crucial details - the documentation is a little lacking in that area too...

in short i can learn how to do it with hg from no previous knowledge so quickly that i can not worry about forgetting it. with git the overhead for learning how to perform this one task is far too great - mainly down to ultra configurability and what imo are extremely poor choices of defaults.

Re:Why is git pull considered harmful? (2013) by korzun on Wednesday March 12, 2014 @11:39AM (#7386232)
No matter how large or small your organization is, you don't work on upstream branch unless you don't understand the whole concept of git.

Even for my personal projects I have my own work and merge to upstream master when I'm ready with a major feature set.

Sure you can work directly on master for small stuff, but for anything else good luck buddy. Humans make errors and it will catch up to you.

Re:Why is git pull considered harmful? (2013) by Guvante on Wednesday March 12, 2014 @12:05PM (#7386426)
> you don't work on upstream branch unless you don't understand the whole concept of git

As painful as it is, it is unavoidable in oddball situations. The problem is everyone leaves it as "don't do that" rather than "don't do that, but if you do, here is how to fix it".

Normally trudging through the doco would get you to the fix, but back to problem #1.

Re:Why is git pull considered harmful? (2013) by enraged_camel on Wednesday March 12, 2014 @01:13PM (#7386878)
>>Matter of fact is: the git UX is awful and it punishes everyone who doesn't have have a high level understanding of how the underlying persistence model works.

I learned Git very recently, and I agree. It took me a while to grasp the basics because they just are not intuitive unless you understand how everything works under the hood.