News for hackers. Stuff that matters.
Re:More Productive Git by chiefalchemist on Friday May 24, 2019 @04:21PM (#20004935)
There's one of these articles at least once per week that makes it to top of HN. When are we collective going to come to the realization that Git is a corded drill in a battery-powered drill world?

Don't get me wrong, version control is necessary. Obviously. But if a plumber, a word-worker or some other artisan used a tool that required a weekly "It's okay, you'll catch on eventually" article, we would have never got out of the Dark Ages.

It's time for an intervention. It's time to take seriously the friction and frustrations it creates. Yes, it has redeeming qualities. But it's time to stop looking past those and do something about them (other than another article such as this one).

Re:More Productive Git by finnthehuman on Friday May 24, 2019 @07:02PM (#20006048)
I, on the other hand, see these threads and wonder how arrogant and fraudulent our industry is when programmers have to pat eachother on the back and say the problem is git.

Git is a tool for creating and navigating a directed acyclic graph of revisions. It’s fine to chuckle and make fun about how esoteric that sounds, but at the same time I expect people that work on my team to rise to the challenge of proving that they occasionally attended data structures and algorithms class.

I understand not taking a day to learn git, I really do. It’s hard to find the time to learn everything that comes your way at work, and you’re not exposed to the practical challenges that augment documentation as part of learning if you try to crush it out all at once. But, if someone can’t learn git, I don’t know what to do with them. We’re not cranking out websites in an agile, typewriter-pool style open-office, sweatshop. I need people that can learn things at least as complicated as git, because they’re gonna have to keep up.

Re:More Productive Git by chiefalchemist on Friday May 24, 2019 @10:05PM (#20006680)
> "Git is a tool for creating and navigating a directed acyclic graph of revisions. It’s fine to chuckle and make fun about how esoteric that sounds, but at the same time I expect people that work on my team to rise to the challenge of proving that they occasionally attended data structures and algorithms class."

And those can (read:should) have a visual representation, yes? Why are we still typing archaic/cryptic commands - read: wasting brain cycles that could be better spent - for what are ultimately manipulation of something best represented visually?

It's time to move on. I'm sure someone will fax you when the time comes. Hopefully, you can keep up :)

Re:More Productive Git by bamboozled on Friday May 24, 2019 @10:13PM (#20006704)
There are visual tools for git though, so what's the problem?

- Gitk

- Tower for OS X

- Github

Besides, some people enjoy using CLI tools the obvious reason that they're simple to use and can be used programmatically with minimal overhead.

Re:More Productive Git by booleandilemma on Friday May 24, 2019 @10:53PM (#20006836)
So you're saying you don't know how to use Git then?
Re:More Productive Git by jldugger on Friday May 24, 2019 @11:34PM (#20006951)
> Why are we still typing archaic/cryptic commands

I mean, you're just describing the act of programming in general here.

Re:More Productive Git by albertgoeswoof on Friday May 24, 2019 @07:09PM (#20006074)
This is self defeating, if git was easier to use your team members could take that extra day and learn something more valuable.

Just because something is hard it doesn’t mean it’s worth doing.

Re:More Productive Git by duncan-donuts on Friday May 24, 2019 @10:01PM (#20006668)
How much of git is actually that hard though? There are definitely some extremely dark corners in git, but most people really only need 4 commands (add, commit, push, pull) to get started. Once you start needing to do more you start to incrementally adopt features. I’m not trying to trivialize git because it’s obviously complicated. I’m not sure I accept that someone can’t be productive with git in a reasonably short amount of time.
Re:More Productive Git by bamboozled on Friday May 24, 2019 @10:07PM (#20006686)
I have to say I thought something similar to your sentiment.

When I interview people for software engineering roles in 2019 who haven't bother to learn Git or struggle to understand it's use-case, basics and relatively simple to use interface I can quite easily use this to make some important assumptions about the candidate. The most important being that maybe software engineering isn't the right career choice for that person, at least not yet.

Is there room for improvement? Sure, but let's make sure where ever we go, it's to a better place, not a worse one.

Re:More Productive Git by wyclif on Friday May 24, 2019 @10:33PM (#20006764)
Another thing about this is the assumption that a candidate has to be a Git ninja. If a dev can't read the Git documentation and narrow down the most important use cases, then it should definitely trigger a red flag. You don't need all the features to be productive. Unless you are an edge case, you can probably do most of what you need to get done with these six commands:

branch checkout add commit pull push

Reading and understanding the documentation for those six core commands isn't a big investment, and it will pay off if you're doing software or documentation development.

Re:More Productive Git by chiefalchemist on Sunday May 26, 2019 @08:22AM (#20014532)
> "I need people that can learn things at least as complicated as git, because they’re gonna have to keep up."

Not to get off topic, but it's your #1 job as team leader to put your people in the best position to succeed. Pounding you fist on desk and shouting "keep up" doesn't cut it.

The question here isn't what is or isn't learnable. The question is, why so much tension and friction (i.e., using the CL) when a visual representation is actually the far better representation of the model / data?

Keep up? Why are we tossing rocks in their toolbox?

Re:More Productive Git by finnthehuman on Sunday May 26, 2019 @12:01PM (#20015584)
I don't pound my fist on my desk like I need more pictures of Spiderman, the nature of the product domain we're working in is demanding.

This is not a defense of the status quo. It's an observation about working within the status quo. If I could choose for everything else to remain equal but git get easier, of course I'd take it. I'd choose for a lot of things to be better, not just software.

My observation is that of all the things a developer might encounter for the first time on our project and be asked to learn, git isn't a standout. This is what I meant by keeping up; there's a lot to learn.

We do what we can to reduce the load, spread it out, and I refine the crash course for new developers every time someone goes through it. But at the end of the day, we have jobs because we can pick this stuff up and get to work with it. Even if git is less than the platonic ideal of version control.

Re:More Productive Git by aasasd on Friday May 24, 2019 @09:25PM (#20006577)
Git's structures are fine. Git's command-line tools are shit.
Re:More Productive Git by agumonkey on Monday May 27, 2019 @04:15PM (#20024967)
it's not the DAG per se, it's how git layers operations on top of it
Re:More Productive Git by F-0X on Friday May 24, 2019 @04:35PM (#20005043)
On the other hand, I don't know who these articles are really for. I have _never_ met a developer who struggles with git. Not many claim to understand it deeply, but all can rebase, cherry-pick, use the reflog, etc. and almost never do they run into issues.

It mystifies me. Git isn't hard, nor complicated. "Checkout" has a few too many meanings, and thats the singular gripe I have with it.

Re:More Productive Git by the_duke on Friday May 24, 2019 @04:55PM (#20005214)
You are lucky.

I know many devs that only use git through their editor or some other git UI and don't know more than commit, pull and clone in the terminal.

Inevitably they always need help when something gets screwed up, or they jump through endless loops to somehow get the desired result through the UI

Re:More Productive Git by alkonaut on Friday May 24, 2019 @04:42PM (#20005106)
I’m about to roll out git to a team of 30 windows devs of the kind that do NOT like using command line (which is a perfectly sensible thing on Windows I should add, it’s rarely needed there and most command line tools including the shell itself sucks). I assure you they will find it complicated. I’ll insist we switch to git but it’s still going to be an uphill battle. Some will surely struggle also a year from now.
Re:More Productive Git by chiefalchemist on Friday May 24, 2019 @05:27PM (#20005430)
Windows user here, tho' I don't think that has much to do with my analysis/opinion. Ultimately, to me, the dev via Git is doing something that is best explained visually. It seems counter-intuitive to type commands for what is visual, at the very leaat it's unnerving (as if we don't have enough friction and stress in our day already).

To me, Git via the command line, constitutes industry "jargon". It's used - wrongly - to help exclude certain people within the broader culture. Git + CL === elitist.

It's also anti-dog food'ing. But perhaps this helps explain why so many UIs and UXs are so subpar? That is, the less you use something (i.e., a proper UI) the less you learn about them?

p.s. What about SourceTree?

https://www.sourcetreeapp.com/

Re:More Productive Git by duncan-donuts on Friday May 24, 2019 @10:07PM (#20006688)
What about using git plus a shell make you an elitist? What if I used something else from a shell that isn’t as negatively perceived as git? I’ve used git with a ui (early on) and a shell (later) and I don’t understand what makes it elitist. Figure out what tools make you the most productive. If vim makes you more productive, great. If a full blown IDE makes you more productive, great. I don’t understand the mindset around being critical of someone doing something in a way that works for them.
Re:More Productive Git by bmalehorn on Friday May 24, 2019 @05:30PM (#20005454)
I think the right approach here is to figure out how to use git in the company IDE. Then, have a presentation / workshop about how to use git in the IDE.

Personally I prefer the command line, but I imagine your coworkers will be a lot more receptive to using version control tools the way they're used to.

If you're concerned about command line complexity, you can try out gitless: https://gitless.com

It's a simplified command line interface to git, designed by looking at how users actually use git.

Re:More Productive Git by chiefalchemist on Friday May 24, 2019 @05:16PM (#20005346)
You have a point. But certainly, we could do better, especially since it's such an important tool. I'm certainly not disputing the concepts. They're necessary. But the tool? In that context "what if" doesn't feel like a bad idea either.
Re:More Productive Git by nlawalker on Friday May 24, 2019 @09:55PM (#20006654)
> Git is a corded drill in a battery-powered drill world

Git isn't a corded drill in this analogy, it's an electric motor: the potential foundation of many different tools for different problems. There's nothing wrong with it, it's just that it would make more sense to use it as the basis of a more complete, ergonomic tool, rather than just sticking a drill bit into the spinning part.

/usr/bin/git is like curl: a command line tool for precise manipulation of an underlying data model/protocol. It's complex, but it works great - if you want to interact with the underlying data model/protocol on its terms. Many people want something that automates a more complex workflow to help them accomplish a higher-level task. For HTTP, we have browsers; for git, we don't have much yet.

Re:More Productive Git by misthop on Friday May 24, 2019 @04:34PM (#20005036)
These articles aren't for the Artisan - they are for, in your metaphor, the apprentice and journeyman.

You should do a lot of learning on using a table saw before you touch one. Using git wrong won't kill you, using a table saw wrong will.

Re:More Productive Git by jtms on Friday May 24, 2019 @04:38PM (#20005068)
Messing up a rebase and then force pushing your altered history might at least equate to shaving off a small chunk of finger :-)
Re:More Productive Git by jharger on Friday May 24, 2019 @05:00PM (#20005259)
Except fixing the rebase issue isn't usually that difficult, if you know about reflog.
Re:More Productive Git by anyonecancode on Friday May 24, 2019 @10:35PM (#20006770)
I'm one of those that likes git, finds it decently easy to use, and is much more productive because of it. But I do think there's merit to complaints about git. There's a wide range of experience, skill sets, and programming styles in our industry, and overall this isn't a problem as people can pick up the tools that work best for them. Look at text editors, for instance -- some people use sublime, others intellij, others vim, others emacs, etc. But for version control, there's really only git now. I'm personally a vim user, but I think it would be strange to insist that everyone must use vim.

The text editor analogy falls short in that version control has to be used by the entire team whereas a text editor only has to work for an individual developer. So, I can see the argument that the standard version control tool should be a little more intuitive. I think one challenge though is that, in my experience, it's not even the command line so much as some basic concepts around vcs that people struggle with, so "more intuitive tool" is a hard challenge I think.

Re:More Productive Git by jtms on Friday May 24, 2019 @04:35PM (#20005045)
It’s not obvious to me that a battery powered drill is the best tool for the job. If you are a professional doing non-trivial work sometimes the corded drill, with all its benefits, is exactly what is needed.
Re:More Productive Git by chiefalchemist on Friday May 24, 2019 @05:31PM (#20005456)
True. Agreed. A cord is not a battery. But we're not even entertaining that idea of having that choice. We have a corded tool. That's it. Remind yourself of using that next time you're standing in a couple inches of water :)
Re:More Productive Git by jacobsenscott on Friday May 24, 2019 @05:52PM (#20005608)
If people would stick to pull, push, commit, and merge 99% of the problems would go away. But there's always one "clean history" OCD nut job who goes ballistic if they see a merge commit in the history. They seem to know everything about git except how to exclude the merge commits from their git log command.

The regular people lose two days of work trying to rebase their merge commits to appease those folks.

Rebase should never have become part of the day to day git toolbox. If it didn't exist nobody would ever see a linear history, and so would never think to care about it.

Thank the maker for github's "squash merge" and "rebase and merge" buttons, which handle all that crap for you. If you're not using a tool that does that for you I'm sad for you.

Re:More Productive Git by alkonaut on Friday May 24, 2019 @04:40PM (#20005087)
Agree (And ironically of course some people agree on this in the discussion on every one of these articles).

Git is the C++ of version control. Of course it’s powerful. Of course it can do everything. And of course it’s a huge frustrating footgun with error messages that rival any c++ template compiler error.

The problem is that we have made it a de facto standard so it’s hard to replace. Even if a much better VCS emerged tomorrow, it doesn’t help if there isn’t support in large issue trackers, CI/CD systems, IDEs and so on.

I have great hopes that pijul will be the better git. But again, it’s the tooling and ecosystem that matters, not the qualities of the vcs itself.

Re:More Productive Git by User23 on Friday May 24, 2019 @07:14PM (#20006097)
Pijul looks cool, but "replace hard to understand directory content snapshots with easy category theory" isn't a compelling proposition outside of maybe the ML/Haskell community.
Re:More Productive Git by pmeunier on Saturday May 25, 2019 @08:23AM (#20008612)
The main point of Pijul is, you never have to think about categories when using it. It's just a sort of Git where you almost never need to branch (the equivalent of a Git branch in Pijul is just a patch), merges are always deterministic and easy to understand, cherry-picking is the default, and works even for conflict resolutions.
Re:More Productive Git by dTal on Friday May 24, 2019 @09:05PM (#20006515)
Interesting choice of analogy. Remember Neal Stephenson's "Hole Hawg" essay [0]? He compares UNIX to this ludicrously, dangerously over-powerful hand drill with no safety features and all the ergonomics of a chunk of steel pipe. And by this he means praise! The implication in that essay was that a powerful, dangerous, unfriendly tool is in some way better than a user-friendly tool that lacks the power to remove limbs.

My takeaway from that essay was that in the real world, you will never see a contractor using a Hole Hawg, or anything like it, and hackers have a uniquely fucked-up attitude to human factors. Hackers will excuse the most tragic of user interfaces, with some kind of macho "rite of passage" bullshit. Yes, "macho":

"Now I view them all with such contempt that I do not even consider them to be real drills--merely scaled-up toys designed to exploit the self-delusional tendencies of soft-handed homeowners who want to believe that they have purchased an actual tool."

See? It's all about self-inflicting pain, because if you can't tolerate the pain of a crappy user interface, you're not a real hacker [1]. I see it in the defense of git's crappy user interface ("the reason you can't remember the 50 semi-orthogonal cryptic commands is because you haven't grokked its perfect model of directed acyclic graph theory"). I also see it in the perpetual defense of Emacs' crappy user interface (infuriating, because it is a powerful piece of software). Hell, I even see it in the defense of the command line interface itself (and associated scorn of GUIs) - many of its design decisions have been baked in since 1969, yet to listen to many apologists its perfection is such that it might as well have been carried down the slopes of Mount Sinai by Moses himself.

This is a major cultural problem with our community. Maybe, if we actually could bring ourselves to admit that our interfaces suck, we might start to make a little progress towards fixing them. Because right now, "tolerance for unreasonable bullshit" is a major filter for who gets to do programming.

"...when I got ready to use the Hole Hawg my heart actually began to pound with atavistic terror. But I never blamed the Hole Hawg; I blamed myself."

Yes. Blame yourself. Blame yourself for using a stupid tool with a bad user interface.

[0] http://www.team.net/mjb/hawg.html [1] https://xkcd.com/378/

Re:More Productive Git by pjc50 on Friday May 24, 2019 @04:36PM (#20005052)
I think experience has shown that some people really like tools that others find really awkward. Sometimes even over the same features described in completely different ways. It is counterintuitive and different from other VCS and reuses commands to mean very different things (especially checkout and reset); that doesn't matter to people who are used to methodically learning these things from first principles.

Plus there's an intrinsic elitism in it being hard to use.

Re:More Productive Git by User23 on Friday May 24, 2019 @07:10PM (#20006078)
> But if a plumber, a word-worker or some other artisan used a tool that required a weekly "It's okay, you'll catch on eventually" article, we would have never got out of the Dark Ages

Tradesmen use all kinds of tools like that, which is why trade schools and apprenticeships are a thing. I bet there are weekly articles on how to get the most out of your Fluke in the trade press, we just don't read them.