Hacker News new | past | comments | ask | show | jobs | submit login
Learn Git Branching (learngitbranching.js.org)
300 points by gerbilly on Nov 21, 2018 | hide | past | favorite | 27 comments



I can't recommend this highly enough. Before, I had been working with IBM Clearcase and SVN, so I don't feel like I "got" git until I saw, visually, the following:

* interactive rebasing

* how remote branches are represented

* what HEAD is, and how it relates to branches

* in day-to-day usage, commits are never really thrown away or deleted. For example, git amend doesn't actually delete a commit.

This was a great starting point, it's highly interactive, and I'm considering learning javascript for the sole purpose of adapting this style interface to teach other subjects. Imagine learning docker through something like this. It's not that much of a reach!


I'm still going through the exercises but as an old SVN user I completely agree, the visual aids in the tutorial are excellent. It would be great to have this resource integrated into a git client.


For those of you about to click: it's a visual interactive guide, and it's excellent. This guide is way too easy to not just learn it right now.


Also, it doesn’t seem to work on mobile, so, maybe saved you a click.



Meta: I opened this on mobile in a background tab and was quite surprised that my browser (Chrome on iOS) forcibly switched tabs to focus on the new tab. It seems it was because the site uses an alert to say "can't receive input on mobile". I guess this is the browser's default behaviour but seems like something that could be completely abused by spammers/advertisers.


This is one of those browser specific things, but I believe should be considered a bug by whatever browser you’re using.


Happens on Firefox for Android, too...


I love this guide, it is seriously fantastic. Definitely one of the more fun ways to learn a useful skill.


This is just an amazing resource. I just found it here and have gone through most of it. At some point I found myself ignoring the goal and just playing with git commands to see the visualization of them. And for the most parts, it's very great!

I need to give this to some people I work with.


It's sad that the default spanish translation is so obviously localized (for Argentinians in particular). It's annoying for the rest of spanish speakers to read the texts, specially the imperatives ("Compartí" instead of "Comparte", etc).


What are developers doing reading a dev resource in a localized version in the first place?


The page spawns in the system locale, and it's pretty hard to change it using the icon in the toolbar below due to the overlay.


That's a valid reason I guess.

Normally I'll read and write any programming related documentation in english, since it's easier to share, refer to common terms and concept, lookup online, etc, and every dev is expected to be able to read it anyway (else they'll have much worse troubles with error messages, tooling, PL syntax, etc).



I don't have an opinion on bilingual ballots or not.

Not even for bilingual texts for medicine or not. I guess French or Russian or whatever texts on medicine are fine.

My comment was strictly for developer documentation -- where everything in programming is in english, and even basic syntax and terminology needs tons of english to grok anyway.

So English + development is more like a case of being an Egyptologist and not speaking ancient Egyptian -- they go with the profession.


"every dev is expected to be able to read it anyway"

There's a lot of developers that don't speak English fluently. Of course they have a hard time, but that statement is false.


That's covered by the use of "expected" I think (as expected != is).

That said, trying to read it in English even if they struggle will benefit them more (even as developers, but also professionally) than using some regional translation as a clutch.

I wouldn't recommend the same for literature or news of course, but in programming english is like part of the basic science.


Me too, I hate reading technical docs in spanish. I wouldn't have translated the web whatsoever.


Try https://learngitbranching.js.org/?locale=en to get the English version.


Second level doesn't work. Created a branch with git checkout -b bugFix level does not complete then, redoing it in two steps as suggested does not complete the level so the player is stuck

fyi


On Firefox at least, I can concur and say it does choke more or less randomly.

I got softblocked on the first level because head didn't move when I committed.

I reloaded the page and it worked.


For me "git checkout -b bugFix" solved the level


Nicely done, but Courier is the ugliest font on Earth (I don't have Monaco). For the sake of humanity, never write "Courier" in a CSS file. ;-)


Yes, I really don't understand that design choice. On Linux you have Deja Vu Sans Mono (same origin as Menlo which replaced Monaco 10 years ago) and on Windows Consolas is a pretty good default. Or because the website is for developers, just keep 'monospace' as the default.


Pretty nice tutorial. Visualization is easy to understand. Took me two hours to finish but enjoyed every minute of it.


The only way to properly learn git.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: