Hacker News new | past | comments | ask | show | jobs | submit login
Githug - an interactive way to learn how to use git (github.com/gazler)
154 points by Gazler on March 15, 2012 | hide | past | favorite | 29 comments



I like that people are learning Git, but why are there so many tutorials for it?

The Git commands that are most useful 95% of the time just didn't seem that hard to learn, IMO. It's not worth wasting memory for the other 5% of the time because I'll probably need to check the man pages anyway.


I haven't had a chance to checkout Githug yet, but for me, as a former SVN user, the switch to Git was daunting. I can't really explain why, but wrapping my head around DVCS took an embarassingly long time.

For those that I point to Git now, especially those that are semi-technical, it's really useful to also point them to a nice intro. As with all new things, lowering any barrier to entry is usually a good thing.


In my case this was because Git has a model of version control that is nowhere as straightforward as SVNs and several hundred command line options without any good indication of what to do when.

We also had a lot of problems with what I think of as "Linux Arrogance" - the person who took the lead on rolling out git refused to even try to help anyone not using git in a bash shell, which is an issue when all the devs are .net developers with no cygwin experience.

Once you can figure out the commands you need to use git is very nice, but it's a nightmare to start and requires a big mental step backwards to teach someone with no exposure to it.


For me the lightbulb moment was seeing the data model explained (in "Git for computer scientists" for example). I'm not sure this can be conveyed in game form, and githug doesn't seem to go there. With close to a hundred commands that can be composed in various ways, teaching tasks isn't as worthwhile as teaching the principles.


> I can't really explain why, but wrapping my head around DVCS took an embarassingly long time.

Git's UI being complete shit probably helped there.


For Mac, I've found this version of GitX to be really good:

http://gitx.laullon.com/


"I can't really explain why, but wrapping my head around DVCS took an embarassingly long time"

I guess the longer you've used a centralized approach, the more "intrenched" that way of thinking is, and the bigger the mental shift has to be.

Unlearning the old can be much harder than learning the new..


Because learning git is not mainly about learning the commands. You can write them down on a Post It note and stick it on your wall. It's about learning about how the whole thing is organized, and different metaphors work for different people.


I always thought the term githug was for when you take a dead old Google Code project you didn't write, and give it a new home on github.


You got me...I got sucked into playing this tonight :) Very clever, you were able to get me to poke around with things I hadn't tried yet. Thanks for providing the reset option, I made a mistake at level 12 and it really came in handy. I'm now at level 20 and it looks like I'm supposed to add a level to the game ;)


I can't quite get past level 4: "Set up your git name and email, this is important so that your commits can be identified"

I had already set these up in my global config, but I ran the following commands anyway: git config user.name "My Name"; git config user.email "my_name@myemail.com"

Looking at the code, it seems that the program is supposed to ask me for my name and email, but it never did.


Me as well. It's never been edited other than the commit so it's not like there was an update. I am on a mac if that matters.

edit: what you can do is edit the .profile.yml file and change :level to clone and under the completed levels area you can add - config to bypass it.

edit2: it looks like it does not work well on the mac as any level that asks a question is not doing so.


Tried playing around and got stuck at the same level. The hint in this case is not very useful unfortunately: "These settings are config settings. You should run `git help config` if you are stuck"


I have the same error on mac as well. I don't see anything wrong with the code for interact, it's just a print and gets.


Thanks for everyone who pointed this out. I'll check it out when I get my hands on a mac.

Update This is fixed in 0.1.4


How do you upgrade? I just installed following the instructions in the readme


Yep... I'm having the exact same problem.


This is topical for me right now, and apologies in advance that I'm going to link back again to my blog at the end of this comment...

I've been thinking recently about how important it is to dominate your tools. Use git regularly? Then learn the shit out of it. Learn how it works in side and out.

Over the last few days I've been committing the entirety of http://book.git-scm.com/ to memory, and many little inefficiencies I never knew were there are now gone.

Committing stuff like this to memory is easy and fun: http://www.writemoretests.com/2012/02/how-to-remember-everyt...


  note Because solution is a Proc, you cannot prematurely return out of it
  and as a result, must put an implicit return on the last line of the solution block.
Maybe not return, but you can `next`: `next true if repo.valid?` works fine within Procs.


Thanks, I'll check out into this solution.


Anyone else increasingly disappointed at the lack of instant demos' on Github pages?


Funny how typing "githug" is a very mind twisting task. You end up with "github" even if you are thinking about the ending "g". Still a very clever name!


I have question on level 21, it said:

Contribute to this repository by making a pull request on Github.

The Hint: Forking the repository would be a good start!

Could someone clarify a bit more?


The goal for the contribute level is for you to contribute something valuable to githug, such as a level or a bug fix.


hmm. I don't see much "interactive" about it. it just spits "Sorry, this solution is not quite right!" at me. WTF am I supposed to do?


figured it out eventually. bad usability though.

Anyway, level 18 is incorrect. the CHUNK does indeed start on line 23, but the line changed is the line 26


When you run `githug` it will tell you what it expects you to do.

If you are unsure, you can type `githug hint` to get a hint.

The solution for the first level is `git init`

I hope this helps you on your way.


I am wondering how many levels are there? o.O ?


interesting idea, but a sample session output in the README would help the short-attention-span peop... brb.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: