11 ms·
Got 15 minutes and want to learn Git?
An in-browser github tutorial powered by codeschool
- skrebbel 14y agoI get an entirely blank page. JavaScript errors. Win 7, Opera 12.
- Toshio 14y agoPssst, Linux+Chromium.
- skrebbel 14y agoPssst, what?
- taylorfausak 14y agoRight, because a good way to fix errors on a web page is to change your operating system and browser. I am curious which JavaScript errors you're seeing, though, skrebbel. I don't see anything amiss in the developer console on Safari 5.1.7.
- usea 14y agoAs another Opera 12 + Win7 user, there are 2 errors. A ReferenceError (undefined variable pluginlist when trying to add "Java") and a TypeError (CourseApp.Views.ChallengeMenu is not a constructor).
- hack_edu 14y agoBTW, people aren't downvoting you because of your convictions as you seem to think according to your profile. They're downvoting you for a complete lack of contribution to the comment thread. That's why people downvote on Hacker News.
- papsosouid 14y ago>That's why people downvote on Hacker News. While it certainly isn't as bad as some other sites, I think it is naive to suggest that nobody has ever been downvoted on HN for having an unpopular opinion.
- hhimanshu 14y agorunning too slow
- RShackleford 14y agoIT ENOUGH GIT TUTORIAL, PLEASE DONT POST LINK LIKE THESE
- Beltiras 14y agoNice idea but far too basic. I need a Masterclass Git page.
- tissarah 14y agoIt looks like if you sign up there will be more classes?
- Beltiras 14y agoWhen I went back to check I got this funky dialog that wanted permissions I was not comfortable granting. Too bad.
- mikegirouard 14y agoI'd love that too… I wonder what the demand is for something like that. I did some programming training a while back and found that there seemed to be way more people interested in the basics. I'd be curious if something like Git would be different.
- RutZap 14y agoI guess it was intended to be basic. The idea behind it is that you take 15 minutes and do some basic things and if you like it then you can then learn more about it... I think it's a great starting point. It gives noobs like me a good interactive, hands-on start.
- lucasgameiro 14y agoI think this kind of stuff always has focus on basic usage. Git has inumerous features and inumerous ways to do some of then. It's so much to put in this format. If you like it and need some more go and read http://git-scm.com/book http://git-scm.com/book ... I've learned a lot in this online book.
- serbrech 14y agothere are some more advanced stuff here, still not expert though : https://github.com/Gazler/githug https://github.com/Gazler/githug would be cool to actually run githug under that website :)
- deleted 14y ago[deleted]
- taylorfausak 14y agoVery slick, but also very slow. Occasionally I have to run a command twice for it to register. Also, it's strange that git's output isn't colorized, considering the "Success!" messages are.
- lucasgameiro 14y agoTotally agree
- obtu 14y agoAll the commands are implemented on the remote end (hence the latency), and some of them look like they are a limited node.js reimplementation (git is mostly the real deal, though the command list is whitelisted). I would be interested in a version that runs locally in JS/Linux.
- juriga 14y agoThis tutorial is very pretty and does a great job of emulating the local Git experience using just a single interactive webpage. However, Github seems to be trying to introduce Git to a wider audience - namely non-developers. From the blog post[1]: "If you know of a developer, designer, or other knowledge worker that would benefit from using Git but that hasn't made the leap just yet, send them over to try.github.com when they have a spare 15 minutes." As a developer, it would be nice to know how well this tutorial really works for non-developers. To me, it seems that the tutorial introduces way too many concepts and details in a very short time for a non-developer to understand. For example, there are a lot of people that work daily with a computer but freeze completely when faced with the task of using a command-line interface. Yes, clicking on the command does write it in the console but you still have to know to press the return key to actually execute the command. I'm not saying people shouldn't learn Git, I'm just wondering what the target audience and purpose of this tutorial is. [1] https://github.com/blog/1183-try-git-in-your-browser https://github.com/blog/1183-try-git-in-your-browser
- stove 14y agoComing from someone who has very little command line experience, my experience with Git thus far has mainly been trial and error. Reading 10 Getting Started With Git blog posts is great, but there's always a part of me that knows some of the information I'm getting could be wrong or outdated. For me, this was a fast confirmation that the commands I've been using are correct and the workflow I've developed is 'valid'.
- patched 14y agoMany great points Jyri. This course certainly is not meant to be a completely detailed introduction. At Code School we're in the middle of working on something that should be more of a step by step introduction. However, I think there's something to be said for showing people how they can be immediately productive with a tool before really understanding everything that's going on underneath. With just a few commands someone can start using git successfully, and that's all we were trying to communicate with this tutorial.
- Stratego 14y agoIt's hard to know how well it works for non-developers until we've had hundreds of non-developers going through the course. Which should hopefully be happening now. I can't speak for GitHub (I'm from the Code School team that built this), but we were very cautious not to introduce too many concepts in that course (you can see below someone saying it's too basic, yes, that's the point), simply the absolute basics we thought people would need to know to understand Git. We also did our best to not introduce Unix concepts, which open another can of worms. The point is that a very large amount of people working on and around the web today are terrified of the command line. There are plenty of tools that attempt to abstract away the Git command line interface, and our goal with Try Git was not to do that. To give people the real Git experience and try to ease them into it. I'm sure we can improve it over time to ensure that fewer people "freeze" in front of a command line. You're right that we may need to be more explicit as to what people should do after entering a command, but we need to stay as consistent as possible with the actual command line. Please feel free to give more feedback, I'll be going through everything that's posted here. — Olivier Lacan
- tissarah 14y agoI really love the idea of sponsored courses/tutorials. This type of thing makes me more likely to use Git and GitHub more, and evangelize more. I have a tough time wanting to pay for a course at a place like code school when I know if I go through the docs/tutorials I'll get it. It's not that I don't think the experience is better, or even (for a certain definition) worth the money. I feel like it is an unnecessary indulgence.
- Stratego 14y agoThis is beginner-level content, which makes a lot of sense as a free resource. We're working on a Code School "Git Real" course for the end of July that will go much further than this and be at an intermediate level, just like most of the courses we offer through a subscription or individual purchase. I suggest you check out the first level of that course when it comes out. I doubt you'll think it's an unnecessary indulgence. In the meantime our Node course is good example: http://node.codeschool.com http://node.codeschool.com
- msg 14y agoIt would be nice to get everything on one page. As it is, in my laptop I am scrolling up and down a lot to see the instructions, the terminal, and the local filesystem, which are laid out as three rows in one long column. I did the tutorial mostly without looking at the filesystem so I could stop scrolling. But I know I missed a few helpful "extra" hints because they were below the fold next to the filesystem. On the plus side, it piqued my interest. I've been meaning to get around to this.
- pardner 14y agoNice tutorial. However, it requires giving an app 'try-git' access to your private and public repositories... so afterwards, probably a good idea to edit your profile, click Applications, then remove the try_git app.
- chmike 14y agoI stoped when it asked to create a repo on github. This is not required to lean git. Well tried ;)
- arms 14y agoRuns a bit slow, but impressive nonetheless. I appreciate the simple but effective interface. I love when sites do something like this in order to give potential users a quick taste of a language or technology. I already learned Git using the Pro Git book, but this would have come in handy as an introductory lesson. This also reminds me the of the awesome tryruby.org
- robbiemitchell 14y agoSomething that often gets glossed over in explaining version control to a non-developer is, "WTF is happening with my files?" The concept of a single folder containing multiple versions of your stuff is a big deal; the fact that you can't simply navigate to a branch as if it's a different folder--that you can't "see" all your files at once--is a non-trivial thing to punch through.
- duopixel 14y agoI really appreciate the new learning tools to become more adept at programming and the command line. However, I often find myself mindlessly re-typing the commands being thrown at me without really understanding what's going on, or why I'm being asked to do it. I liked the approach of Ruby Monks where they give you a task and let you guess the syntax. If you got stuck you then look at the solution. I don't mean to make less of try git, or any other interactive tutorial. We live in a wonderful time where we are able to learn powerful tools without even installing them, so I almost feel bad about making this criticism. But I think current tools could be improved by removing some of the wizardy feeling and allowing users to play around and trying to figure out stuff on their own.
- Stratego 14y agoThis is a great point. But before you can make people work at understanding something, you have to make them realize that they have a stake in trying to learn. I don't think everyone (and certainly not myself) was able to understand the value of Git at first glance and decide to invest time and effort into learning about its inner workings. Normal Code School courses and Ruby Monk challenges are made for people who already have somewhat of a vested interested in learning. Something that pushes them to challenge themselves beyond a simple demo/interactive tutorial. People like that are (sadly) a limited subset, we're trying to broaden that.
- dpcan 14y agoNOTE: This is not a rant, I'm just trying to give you a peek into my mind as I tried out this tutorial. I'm doing my best to describe my confusion. I have no clue how to use Git, and I've been trying to wrap my head around it for a while. Unfortunately, this is yet another tutorial that is very frustrating even though it's designed to target noobs like myself. So, I added octocat.txt to my staging area. Success! ... Wait. Why do I care? What did I do? Staging what, for what? Huh? I committed some random text. Or something. And I typed "-m". So does "git commit -m 'something random'" actually do something? What did I commit to? Arrrggg. Why did I -m !? Then there's this one: git commit -m 'Add all the octocat txt files' So it understands plain English? Was that the random text? Is that just some sample text as part of the Tutorial or does that actually work on Git? Oh man, I'm now more confused than when I started. ... Anyway, for some reason, everyone who tries to describe Git already has such a strong understanding of it and it's oddities, that they are, for some reason, unable to lay it out properly for a noob IMO. I cannot figure out how anyone figures out Git, I assume there was some serious hand holding, because I'm just not grasping it and I usually "get" this stuff rather quickly. Maybe that's the problem, Git isn't something you can just pick up quickly, maybe I need to buy a huge Git how-to book like the old days. Sincerely, Frustrated in Programming Land.
- arms 14y agoThe tutorial definitely glosses over some information that you would need to research later on. For a more in-depth guide, check out the Pro Git book @ http://git-scm.com/book http://git-scm.com/book. You can read it online for free.
- phillijw 14y agoI see people recommending pro git but it barely covers anything useful.
- to3m 14y agoThe Pro Git book is relatively good. Ignore Chapter 1. http://git-scm.com/book/en/Git-Basics http://git-scm.com/book/en/Git-Basics
- usea 14y agoThe tutorial guides you through using some git commands, but it doesn't let you deviate. It encouraged me to make up commit messages, but when I look at the log it apparently ignored my messages and used some other ones. If it's not going to represent the actual experience using git, why bother? It serves only to confuse.
- p2e 14y agoI agree. I kept trying to "ls" and observe what was going on between each command or examine the directory structure of /.git and so on. Only later did I realize that there was a filesystem explorer-like window below. Also, having them automatically adding files to the directory was kind of confusing. Sometimes I would type a command and something new would appear in the file system as a result of that command. Other times, I would type a command and something new would appear in the filesystem that I suppose was expected to be used for a subsequent step. It would have been nice if these things would have happened in isolation from each other. That way I could run the command, see what happened, and then perhaps click "next" to move onto a different scenario with a new set of files I could add to the repository.
- yashchandra 14y agoI just did this and it was cool. But, if you are a complete beginner to version control in general, it may not be simple to follow. It tries to explain a few things such as creating a branch, checking out etc. but for a complete beginner, this tutorial will be a little bit difficult. Kudos for web based interactive learning though!!
- lambtron 14y agoAs someone without a trained programming background and never once used any version control (last time I programmed was for the ti-83 in middle school), Git at first was tough to pick up. It wasn't until I went through Michael Hartl's Rails tutorial that I actually learned Github, master/branches, etc., and understood what are commits and pushes.
- p2e 14y agoAs someone new to git, I was dissapointed to see that: git add "*.txt" added all of the .txt files from the current directory AND all of the .txt files contained within a subdirectory. I would have expected the same files to get added as those that would have shown up using: ls *.txt For other new users: I've been told that this is an error in the tutorial. The tutorial forced the use of quotes but apparently they are not required and git would have added only the files that show up with the ls command as indicated above. EDIT: I'm wrong. Using quotation marks DOES make git fetch .txt files within subdirectories. As pointed out by cellularmitosis, git seems to do it's own "interesting" glob expansion.
- cellularmitosis 14y agofor those who aren't familiar with the nitty gritty, what's happening here is that bash (your shell) expands the "glob" (* .txt) before it ever runs ls, so what actually gets run isn't 'ls * .txt', it's 'ls foo.txt bar.txt dog.txt' etc. but when you put quotes around "* .txt", that tells bash not to expand the glob. so in the above case, '* .txt' is actually getting passed into git, rather than 'foo.txt bar.txt dog.txt' etc. I'm not a git user, but it sounds like git has special handling for "* .txt" which causes it to perform its own glob expansion, which happens to also include descending into directories. hilarity ensues. EDIT: I can't seem to figure out how to type * .txt without triggering the italicized formatter, so I had to put a space after the asterisk. urgh.
- Sindacious 14y agoIt had you use `git add '* .txt'` because there were untracked txt files in the octofamily directory. `git add * .txt` would have just added the txt files in the root of the directory and ignored the octofamily directory. I wouldn't think this is so much an error as they _want_ you to use '*.txt' to add the files in the subdirectory along with the files in the root. They could have touched better on the difference between quotes and no quotes though.
- kristopolous 14y agoNice Find! I added it to my git-themed twitter account here: https://twitter.com/#!/gitHater https://twitter.com/#!/gitHater Let me explain what's happening. What you are looking at is actually part-git, part unix-shell-y. You did ls * .txt Let's try something way crazy, type echo * .txt What do you see? All of your txt files right? But that's just echo, not ls. Ahh. Here's the clinch. When you do " * ", that's called either shell "expansion" or "globbing" depending on your shell. Basically, the shell says "ok, before I run your command, I'm going to look at it and see if I need to do anything on my end" This is why you can do $ n=0 $ echo $n The shell hijacks your input, replacing "$n" with "0", then feeds it into echo In your example, the shell has hijacked the star in "ls * .txt", replaced it with all of your txt files, say (a.txt, b.txt) and then ran ls. That means that ls ACTUALLY got ls a.txt b.txt And THAT's why it works with echo. --------- So git add "* .txt" works differently, what gives? Well, when you put things in double or single quotes you are telling the shell "hey, don't do your usual stuff here". The single quotes are more extreme. If we go back to our n=0 example we can try two more things: $ n=0 $ echo $n $ echo "$n" $ echo '$n' As you can see, the ' says "relax shell, I have this". So when you do git add "* .txt" you are actually passing the "* .txt" to git. In most reasonable, sensible programs, the program will look for a file named "asterisk dot t x t" in this case. But alas, our friends at git have decided to be tricky. The ' * ' syntax for git is similar to gitignore-like syntax (http://www.kernel.org/pub/software/scm/git/docs/v1.7.10/gitignore.html http://www.kernel.org/pub/software/scm/git/docs/v1.7.10/giti...) "Awesome", you exclaim! Not so fast. It's not the same. So git add '!1' doesn't work. git add 'one/ * * ' doesn't work, only git add ' * ' seems to work. Why is it so hard? Good question! I haven't any idea. But we can commiserate together ... you know, over twitter. Have a good one!
- tdonaghe 14y agoThe tutorial seems broken for me. I'm at the point where you do a git checkout clean_up and then nothing at all happens. You just get the prompt back. If I try git status same thing. I've reloaded the page multiple times, but same problem. Maybe Code School needs to work out a few more bugs?
- tsurantino 14y agoDoes this straight up just not work for anyone? I am typing in commands and am getting no feedback. Just getting a new $ line.
- Kilimanjaro 14y agoNop working here either. OSX Lion, Safari + no plugins + no java + adblock just in case.
- lwm 14y agoYup, its completely dead...
- tdonaghe 14y agoI'm having the same problem. Other people are complaining about this in their support forums. Doesn't speak too highly of Code School in general.
- tdonaghe 14y agoLink to their support forum's topic on this: http://help.codeschool.com/discussions/code-school/3731-try-git http://help.codeschool.com/discussions/code-school/3731-try-...
- UnoriginalGuy 14y agoThis doesn't help you learn Git. It helps you learn the commands for Git if you're already familiar with version control. I can kind of sort of use Git already but frankly I don't understand what half of the commands do nor do I understand the point of them. Technically the only commands I would assume you need are: - Get repository - Merge repository (with comment) - Get history/comments But Git has dozens of different things it can do that expand on the above and learning it all is time consuming and there is no one single place to do so (and no the documentation isn't a good place because it isn't a intuitive way to learn). The biggest hurdle of using Git is that Git has its own vocabulary for things; and there is nothing "common sense" about that vocabulary. Even people who attempt to explain it assume you know another version control so use vocabulary from that.
- forrestthewoods 14y agoCan 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 <X> 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 stop treating Git like it's easier or more simple than it actually is.
- envex 14y agoLearning everything about git is hard, but learning enough git to use personally isn't that hard. I use git personally to keep backups of my code and deploy sites I work on. I dont' work with other developers so my knowledge of git is workable, but probably super small. Git gets complicated (but probably extremely useful) when working with bigger groups and tons of commits, branches and merges.
- wonnage 14y agoI feel like there's not much point in any sort of VCS lesson if it doesn't go over the more complex areas though. For example, reverting commits and resetting to earlier points in history are pretty essential actions, but both have their subtleties in Git (e.g why reverting a merge is hard, what 'reset' vs 'checkout' do) that will bite you if you don't know what you're doing. And everyone's fucked up via git rebase at least once. If you never need to merge, revert, or in general use any of the aspects of Git that make it special then it's totally reasonable to use something simpler like built-in OS versioning or a conceptually simpler VCS like SVN. But I guess there's no reason why Github would sponsor that, right?
- Trufa 14y agoI disagree, I use the very basics of Git for my very small one man projects and was very happy about it! But it just so happened that some have grown to two or three man projects that benefited greatly of actually having a distributed system already setup, this wouldn't have happened if I would have been using the wrong tools! Git is quite easy to use a at a basic level and you know it will scale just as much as you probably need, I have no idea which of my projects will grow and how big, but I do know that using the right tools from the very beginning will not come back to bite me later!
- kentbrew 14y agoThis was working nicely until about step 20, where everything sort of hung. I've deleted cookies, removed the repository, and tried to restart but I am now hung on step 1. (By "hung," I mean: I've issued the command but nothing ever comes back.)
- conradfr 14y agoMy use of Git is basically to have a dev branch where I commit randomly, like some sort of ftp/backup, and a master branch that I merge from dev if I have a release ready. The other day I tried to merge only some files from a new "experimental" branch and failed hard. I then realized I had it all wrong about how to successfully commit and manage branches. And felt so lame :) The sad part is that I am the only one trying to use a CVS at work. TL;DR : I still need to learn Git, so thank you everyone trying to "teach" it.
- deleted 14y ago[deleted]
- EricDeb 14y agoAs someone who has never used git I found this tutorial relatively acceptable. I was disappointed there was not a level 2!
- gaoshan 14y agoBasic Git is easy. This intro is basic. Just be aware that it can get much more complicated and the answers to how to do it may or may not be readily available via Google. This guide is like starting the "Couch to 5K" fitness program but knowing that, if you stick with it, eventually you will have to compete in a marathon.
- ojjop 14y agoDoes not work with Opera.
- azarias 14y agoPff...this command line doesn't even know 'ls' :)
- jbarham 14y agoGit: the cargo cult SCM. Too much unnecessary voodoo. Given the choice I'd take Mercurial any day.
- gburt 14y agoThis is basically a glorified animation. On the commit stages, try adding a different message than theirs. When you get to the log stage, it shows their messages. :-(
- Inetgate 14y agoThat page is broken. The try.github.com will redirect to http://try.github.com/levels/1/challenges/1 http://try.github.com/levels/1/challenges/1 but I got "We're sorry, but something went wrong. (500 Internal Server Error)"
- mikescar 14y agogit: 'clone' is not a git command. See 'git --help'. What? I don't know if this is allowed later and everything is sandboxed.
- krollew 14y agoNice, but I think it's far too few. Stuff that this tutorial could be handled with tar as well. I'm not sure if it would encourage to use git somebody who doesn't know much about version control. Somebody who know, probably don't need it because commands like "git log", "git add" and "git commit" are quite obvious for someone who used SVN or other version control system.
- basicallydan 14y agoGit _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.
- shasty 14y agono i dont have 15 minutes
- florestan 14y agoI seem to have great problems with this tutorial. And not that it actually does not help me with why and how I should use it in different scenarios (wich it doesn't), but my entire computer crashed for the first time. Got a major error, lots of blinking on the screen and the had to reboot several times. When I tried open it again, chrome crashed every single time. Not impressed.
- grannyg00se 14y agoA lot of these Git tutorials seem to walk you through a series of commands as if knowing the commands is knowing Git. I think they should focus on scenarios instead. Short stories like: "Bob's code is working well but he wants to try something that might be completely misguided. He knows better than to mess with his working code....." Then at the end of the story a command is introduced. Also, some kind of indication of what Git is actually doing when you issue that command. When you tell Git to branch, what actually happens to the file system? When you say git status, what is it actually looking at? And please, don't start a tutorial on Git without introducing the three area paradigm (working, staging/index, commit) Here's a talk by Scott Chacon of GitHub. http://www.youtube.com/watch?v=ZDR433b0HJY http://www.youtube.com/watch?v=ZDR433b0HJY It's over an hour long and very detailed.
- dbalatero 14y agoOne bit of feedback: it's hard to notice that the Advice box has changed every time you advance a level. Can that be made more obvious? (here's what I'm talking about: http://cl.ly/251P3i2t1k1p3C3U0D0u http://cl.ly/251P3i2t1k1p3C3U0D0u)