Live data from Hacker News

Picturing Git: Conceptions and Misconceptions

biteinteractive.com

51–60 of 105 posts

Re: Picturing Git: Conceptions and Misconceptions

#51
post #49

Earlier quoted context omitted.

> just demonstrates that the git interface is horribly broken This is HN criticism #94238 on the terrible git CLI. Okay, sure. Would you kindly post your superior git CLI? Or at least the outline of it? --- Snark aside, Git's popularity is not an accident. Bitbucket supported Mercurial too.

git has quite an inconsistent cli, this is well covered in "master git". And yes, I said it without proposing a better one.

"master git" This is a great demonstration of git's inconsistencies.

I maintain git stacks up well against other similarly mature/complex software (Nginx, AWS, Java), but it's a wonderful read nonetheless.

(And holy hell what a hard thing to search for...can't find the link.)

Re: Picturing Git: Conceptions and Misconceptions

#52

I read most of this long article, and I found it useful, but: It's unsurprising that people's mental model of git is incorrect. Git is not something people study at a conceptual level, it's something they learn recipes for in order to work on some project. Recipes like "how do I save all this work I just did" and "oh shit, everything is hosed, please give me a magic spell I can paste into my terminal to fix it". I do…

idk man, if you're a software engineer I think the onus is on you. There are plenty of great and free resources, like the pro git book. Every month there's a thread where a bunch of people come in and bemone how git is complicated blah blah. Every month lots of people point out that git is much easier to use if you just bother to conceptually learn about it's internals.

it's like coming into a forum for accountants where people bitch about having to learn tax code. please...

Re: Picturing Git: Conceptions and Misconceptions

#53
post #49

Earlier quoted context omitted.

git has quite an inconsistent cli, this is well covered in "master git". And yes, I said it without proposing a better one.

"master git" This is a great demonstration of git's inconsistencies. I maintain git stacks up well against other similarly mature/complex software (Nginx, AWS, Java), but it's a wonderful read nonetheless. (And holy hell what a hard thing to search for...can't find the link.)

https://stevelosh.com/blog/2013/04/git-koans/

The trick is to remember it's called "git koans"

Re: Picturing Git: Conceptions and Misconceptions

#54
post #18
post #5

Earlier quoted context omitted.

It is just a tool to help you do your real work and famously gets in the way. You use SVN and it covers 99% of use cases much more simply than Git manages.

If svn covers 99% of your use cases, then you need more experience with distributed version control systems. Able to commit locally, examine changes work with them and then push is a something you might not need or require if you think about version system like SVN. But if you have learned Git or Mercurial or some other distributed system you would never go back to svn.

I have lots of experience with git (5 years of usage, 1 of those years was writing tooling in and around git) and pretty much the same experience with perforce, and I much prefer the centralized model of perforce to all the extra fun that comes with git

Re: Picturing Git: Conceptions and Misconceptions

#55
post #12

Earlier quoted context omitted.

Reminds me of: Bad programmers worry about the code. Good programmers worry about data structures and their relationships. -Linus Torvalds Anyway, it's not for everyone to get to understand git this way, I guess. Some people will just react "just tell me how to do X in git!"

Like a lot of things Linus, it's very pretentious and aloof but right at the core of it. Code matters a lot and bad code can tank performance, stop evolution and introduce security issues. But with Git, this is a mostly truthful statement.

I remember reading a quote where he states, that when looking at new code he starts with data structures, to get an understanding of what's going on. Or something to that effect.

That would be more applicable here. But I couldn't immediately find it, so I pasted this one instead, which is somewhat close but not perfectly related to the OP.

Re: Picturing Git: Conceptions and Misconceptions

#56
post #12

Earlier quoted context omitted.

Reminds me of: Bad programmers worry about the code. Good programmers worry about data structures and their relationships. -Linus Torvalds Anyway, it's not for everyone to get to understand git this way, I guess. Some people will just react "just tell me how to do X in git!"

Sometimes you just want your tool to get out of your way and get the job done, instead of deeply understanding it. No shame in that. There are limited hours in the day and sometimes other things are more important.

I get what you mean, but git is basically a tool for manipulating the .git directory (and a working directory checkout).

I think understanding what .git dir contains and represents is as important as understanding the tool.

It's not like you need to understand how the tool works internally, or how it's built.

Analogy would be that you want to understand how to use a hammer, sure, but also the characteristics of material you manipulate with it. You don't need to understand how the hammer is built.

Re: Picturing Git: Conceptions and Misconceptions

#57

I read most of this long article, and I found it useful, but: It's unsurprising that people's mental model of git is incorrect. Git is not something people study at a conceptual level, it's something they learn recipes for in order to work on some project. Recipes like "how do I save all this work I just did" and "oh shit, everything is hosed, please give me a magic spell I can paste into my terminal to fix it". I do…

> I don't really blame people, since git itself does nothing to teach you how it works. Git it is the definition of something you have to deal with in order to do something more important to you. Some people want to dig deep and understand how the system works: it's nice to sit near that person and ask them for help sometimes.

The official git handbook, freely available on the official git-scm site is not terribly long, and explains the internals on a conceptual level quite well.

I think the problem is most people learning git land on some wordpress site of someone trying to flog a condensed and uninsightful shortcut to getting started with git for ad clicks, which only involves a series of commands without explaining the effects of those commands - This, combined with peoples expectation that an SCM should take no thought whatsoever causes most people that use git on a day to day basis to not really understand it at all.

Git needs to be introduced as powerful data structure, kind of like how SQL is not a DB, imagine someone explaining SQL without ever refering to the DB tables, rows and fields... only talking about git commits is like only talking about the result of a single query. You must understand the data structure to easily use the interface, otherwise the interface will be very confusing or you will be limited to "recipes"... after that you are just learning new variations on how to manipulate and navigate that structure (yes the graph), and from this perspective peoples complaints about the historical inconsistencies we have to put up with in git porcelain are moot.

Re: Picturing Git: Conceptions and Misconceptions

#58
post #9

Ugh. So many concepts. So many things to remember. Why? Git is simple. SIMPLE. But only, IMO, if you go bottom-up and not top-down. There are only 6 critical concepts in Git and each is simple enough to be described in a single sentence. 1. Commits are immutable blobs that have one or more parents. Graphs, not trees. Anyone who uses trees for git commits misses the whole point and makes their (and their collaborators…

https://gist.github.com/nicowilliams/a6e5c9131767364ce2f4b39...

Re: Picturing Git: Conceptions and Misconceptions

#59

I read most of this long article, and I found it useful, but: It's unsurprising that people's mental model of git is incorrect. Git is not something people study at a conceptual level, it's something they learn recipes for in order to work on some project. Recipes like "how do I save all this work I just did" and "oh shit, everything is hosed, please give me a magic spell I can paste into my terminal to fix it". I do…

I use this when I want to teach someone Git: https://gist.github.com/nicowilliams/a6e5c9131767364ce2f4b39...

Re: Picturing Git: Conceptions and Misconceptions

#60
post #53

Earlier quoted context omitted.

"master git" This is a great demonstration of git's inconsistencies. I maintain git stacks up well against other similarly mature/complex software (Nginx, AWS, Java), but it's a wonderful read nonetheless. (And holy hell what a hard thing to search for...can't find the link.)

https://stevelosh.com/blog/2013/04/git-koans/ The trick is to remember it's called "git koans"

Thanks.
Post reply on HN