Live data from Hacker News

Got 15 minutes and want to learn Git?

try.github.com

51–60 of 178 posts

Re: Got 15 minutes and want to learn Git?

#51
post #30

NOTE: 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! ...…

You're right. I'm halfway from git noob to power user. My problem with git is that everything is named badly. index, staging, head, ref, reset, rebase, pull, fetch, merge, all of it could have been named better. The commands could have better arguments. And you're right about most tutorials. They only make sense if you already know git.

These are pretty good. It's when I saw these that I realized everything in git is named poorly:

http://marklodato.github.com/visual-git-guide/index-en.html http://ndpsoftware.com/git-cheatsheet.html

Re: Got 15 minutes and want to learn Git?

#52
As 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.

Re: Got 15 minutes and want to learn Git?

#53
post #30

NOTE: 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! ...…

I'm about half way through the Git Immersion tutorials [1], and so far it's been pretty good - clear explanations of what you're doing and why you should care.

[1] http://gitimmersion.com

Re: Got 15 minutes and want to learn Git?

#54
post #46

The 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.

I 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.

Re: Got 15 minutes and want to learn Git?

#55
As 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.

Re: Got 15 minutes and want to learn Git?

#56
post #30

NOTE: 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! ...…

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 text (not programmers) use Git.

There's plenty of Git command tutorials already; let's hear about how you actually use Git.

Re: Got 15 minutes and want to learn Git?

#57
post #30

NOTE: 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! ...…

I figured out Git, and I'm not that clever, so don't worry!

The staging area (aka the index) is where you put things before they become a commit. You don't always want to commit all of your changes at once. The index is there so you can commit the changes you want instead of just committing all the changes every time.

`git commit` means "turn the contents of the index into a commit". A commit is a set of changes that logically go together denoting a version of the repository. A commit needs to have a message describing what the commit does. If you just type "git commit", it opens up an editor for you to type in your commit message. If you want to skip the editor, you can just pass in the -m flag, followed by your commit message in quotes.

Are you familiar with the shell? Are you comfortable with the concept of a linked list? If not, work on those--even if you don't use Git, it's part of being a better programmer. But if you do understand these things, you can fairly easily get a very deep understanding of Git.

Re: Got 15 minutes and want to learn Git?

#58
post #8

Nice idea but far too basic. I need a Masterclass Git page.

there are some more advanced stuff here, still not expert though : https://github.com/Gazler/githug would be cool to actually run githug under that website :)

Define expert, I'll see what I can do!

Re: Got 15 minutes and want to learn Git?

#59
The 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?

Post reply on HN