Live data from Hacker News

Got 15 minutes and want to learn Git?

try.github.com

141–150 of 178 posts

Re: Got 15 minutes and want to learn Git?

#141
post #98
post #56

Earlier quoted context omitted.

I sympathize. What is really necessary are not tutorials on how to use Git--it isn't that hard, after all, for most of us--but more of a description of actual workflow. Not HOW you issue Git commands; but how to use Git. It would be interesting to read articles about how a single programmer uses Git, how a small programming team, how a distributed team uses Git. Similar articles about how a team producing art, or tex…

I completely agree. If it helps, I wrote up some visual tutorials about version control in general that many have found helpful: http://betterexplained.com/articles/intro-to-distributed-ver... The idea is to build a mental model about what is possible vs. memorizing a bunch of specific commands. Once I wrapped my head around the concepts, the commands fell into place.

Looks good!

On my screen the text is light gray on white. Is that intentional?

Re: Got 15 minutes and want to learn Git?

#142

Can we please stop pretending that Git is simple and easy to learn? If that were true then there wouldn't be "Learn how to use Git in minutes!" posts every other day. The fact of the matter is that Git is incredibly powerful but also complex and hard to learn. This isn't a bash on Git at all. It's ok! Sometimes complicated things are just that, complicated. I believe we'll have better guides and tutorials if people s…

Complex is not the same as complicated. Git is complex, but not complicated.

Re: Got 15 minutes and want to learn Git?

#143

Earlier quoted context omitted.

> Just by operating from the command line you've already left the realm of "simple" in my opinion. Git is a tool for programmers. There's no excuse for a programmer to be uncomfortable with the command line.

I am a productive programmer and I am absolute uncomfortable with the command line. I can't count the times I have written svn commit -m "Finally fixed bug #123!" ...only to get some weird bizarro error because I should have used '' or escaped the !. This is usually when I am deeply focused on some programming language or bug #123. Tower.app is the only reason I've ever touched git, and the line-by-line staging and c…

Well, suit yourself. It's just a tremendously useful skill to have. Makes it a bit less of a hassle to ssh into the odd server to check the logs, or dump a database, or use tools that don't have a GUI.

I mean, fundamentally, you're typing things to a computer and then the computer does what you typed. Why should that notion be uncomfortable to a programmer of all people?

Re: Got 15 minutes and want to learn Git?

#144

Earlier quoted context omitted.

In a nutshell... a project can be described in terms of the changes a user makes over time. In Git, these changes are called "commits". Commits contain a change a user has made to the code and some additional useful metadata. This metadata includes the time the change was made, the user's name, a message to describe in general terms what the change was (that -m thing), and so on. Git itself is a database that stores…

Again, this is a gross oversimplification that describes only generic version control concepts and none of the powerful features that . Go ahead and try explaining a rebase without trying to broach the concepts of time travel. How about why having a local copy of all commits/branches/etc related to the repository is helpful, or even at all possible, without relating it to a simpler client/server version control syste…

Go ahead and try explaining a rebase without trying to broach the concepts of time travel.

A project can be described in terms of the changes users make over time, and that lets us undo any previous changes all the way back to the beginning of the project.

I don't think that explanation is overly technical or difficult to understand, and the generic features of version control which you dismiss are precisely those that make it most useful - the above paragraph in my opinion encapsulates most of what is useful about a VCS. To extend the above to cover a rebase:

A rebase is just merging other people's changes with yours, so that you end up with a merged version of the files, but with details that mean it looks slightly cleaner in histories - it's not even something many people will ever have to do. As to why having a local copy is useful, who cares, it's a detail of how the VC works?

This really is not rocket science - while git can at times be frustrating if you hit a particular problem which it doesn't consider important like expunging files from history, the basics are very very simple. You really only need 3 commands for day to day use:

  git pull (get other people's changes)
  git push (send your changes to others)
  git commit (commit a change to your local copy)
Actually for commit I just add all new non-ignored files (using an alias like this: "git add --all .;git commit -a -m") to save typing, otherwise I might have to use git add as well now and then, so I use commit "My message here". If the above commands are scary, there are various alternatives to VCS, but they're not as good - you can rename your files when you make a change, you can use something like Apple's Time Machine, etc. All of those work, but are not really as easy as VC when you're changing a lot of files.

Re: Got 15 minutes and want to learn Git?

#145

Can we please stop pretending that Git is simple and easy to learn? If that were true then there wouldn't be "Learn how to use Git in minutes!" posts every other day. The fact of the matter is that Git is incredibly powerful but also complex and hard to learn. This isn't a bash on Git at all. It's ok! Sometimes complicated things are just that, complicated. I believe we'll have better guides and tutorials if people s…

Complex is not the same as complicated. Git is complex, but not complicated.

Git makes me think of Go (the board game), Rule 30 and Rule 110 cellular automata and Conway's Game of Life: a few simple defining rules that can be explain in a minute, but incredibly rich behavior follows.

Re: Got 15 minutes and want to learn Git?

#146

Can we please stop pretending that Git is simple and easy to learn? If that were true then there wouldn't be "Learn how to use Git in minutes!" posts every other day. The fact of the matter is that Git is incredibly powerful but also complex and hard to learn. This isn't a bash on Git at all. It's ok! Sometimes complicated things are just that, complicated. I believe we'll have better guides and tutorials if people s…

Your comment reminded me of http://news.ycombinator.com/item?id=4201044 (I posted it after reading your comment), that impishly hints at what you say.

Re: Got 15 minutes and want to learn Git?

#147
post #98

Earlier quoted context omitted.

I completely agree. If it helps, I wrote up some visual tutorials about version control in general that many have found helpful: http://betterexplained.com/articles/intro-to-distributed-ver... The idea is to build a mental model about what is possible vs. memorizing a bunch of specific commands. Once I wrapped my head around the concepts, the commands fell into place.

Looks good! On my screen the text is light gray on white. Is that intentional?

Whoops! Thanks for the comment, the text should be a readable black on white (like this: https://skitch.com/kalidazad/er7an/intro-to-distributed-vers...).

Which browser were you using? (I just tried FF, Chrome, Safari) Thanks!

Re: Got 15 minutes and want to learn Git?

#148

Earlier quoted context omitted.

I am a productive programmer and I am absolute uncomfortable with the command line. I can't count the times I have written svn commit -m "Finally fixed bug #123!" ...only to get some weird bizarro error because I should have used '' or escaped the !. This is usually when I am deeply focused on some programming language or bug #123. Tower.app is the only reason I've ever touched git, and the line-by-line staging and c…

Well, suit yourself. It's just a tremendously useful skill to have. Makes it a bit less of a hassle to ssh into the odd server to check the logs, or dump a database, or use tools that don't have a GUI. I mean, fundamentally, you're typing things to a computer and then the computer does what you typed. Why should that notion be uncomfortable to a programmer of all people?

Oh, I can use the terminal, I can also theoretically write PHP, and every vim user can theoretically use Eclipse. But that doesn't mean that any of us would be comfortable with it - we'd all be anxious and focused on the tool (instead of the problem at hand) not to break stuff left and right.

Re: Got 15 minutes and want to learn Git?

#149
post #132

Earlier quoted context omitted.

I think this is a general problem with people with extreme addiction to IDEs and Windows based UIs. I've known people in my team who can't do any work on the command line comfortably. I see this problem especially among people who work on Frontend and especially Java developers. If a certain set of tools are making you dumber by the day, know it for sure that it will be automated or you will be replaced by lesser ski…

> If a certain set of tools are making you dumber by the day How does "not comfortable with the command line" translate to "dumber by the day?" If people get their training using IDEs and go on to be productive using primarily IDEs, how does being uncomfortable with the command line reflect on their intelligence in any way? > know it for sure that it will be automated or you will be replaced by lesser skilled cheap l…

You are taking it personally.

>>How does "not comfortable with the command line" translate to "dumber by the day?" If people get their training using IDEs and go on to be productive using primarily IDEs, how does being uncomfortable with the command line reflect on their intelligence in any way?

Because the common characteristics of such people is to heavily depend on intellisense and auto complete to do almost any task. Tool generated code is so common in those communities most code is generally taken care by the IDE. Import statements, exception handling, try/catch blocks, loop generation in context of previous statements. The list endless...

When you are tuned to thinking this way you basically lose any touch on proactive coding. You stop thinking, the IDE starts thinking for you. You stop reading API because you know everything is about to be auto completed, anyway. Now the issue is you are offloading the job of thinking to the IDE. This is dangerous.

If a rookie can do what an expert can, just by using an IDE. I guess its time for the expert to fear for his job.

Lack of knowledge of command line utils is just one such case. You can either learn how to use awk/sed/Perl + Text processing utils. Or you can open up eclipse and endlessly re implement what the command line has to already offer.

When you start looking this from the larger perspective, refusing to learn tools designed to solve a problem in the proper way and taking short cuts, actually makes your life difficult on the longer run.

>>Yes, the mundane, confusing use of the git command line is here to stay and the dumb "actually design and engineer an application" world of IDEs is going to be replaced by robots. You are a fucking genius. Only on the internet can such backwards and completely worthless logic be said because if you tried to say this shit to anyone in real life you'd be laughed out of the room.

Definition of dumb varies. Definition of 'usability' varies. By your definition a programming language could be called dumb, a microprocessor and its interfaces can be called dumb, A pilots cabin and controls can be called dumb(As they are both not easy to laymen, and have never even made progress in that direction). A tool like git is not designed to be a toy or recreation software. Its supposed to manage text/binary versions in situations faced by individuals, small and large teams managing software projects.

Therefore it is designed to cover features in that direction, for programmers. Not for your ordinary user who needs to use the ATM to withdraw money.

Complaining about command line's usability being difficult is same as complaining about an Airplane's cockpit.

Re: Got 15 minutes and want to learn Git?

#150
Git _isn't_ easy to learn. Not at all. You can't spend 15 minutes looking at a Git tutorial or playing a game which teaches you Git, close the page and exclaim "Excellent! I know Git now!" - you can however put it on your CV, and blag it in that new job you're applying for where you need to understand git.

Like most things in software development, learning by doing is the best option because most people don't have photographic memories, and having a reference is usually essential.

Luckily, we all have one huge reference available to us, for free (more or less), with a thriving community who are more than happy to help: The Internet.

This tool is, nonetheless, a good starting point.

Post reply on HN