Live data from Hacker News

Got 15 minutes and want to learn Git?

try.github.com

41–50 of 178 posts

Re: Got 15 minutes and want to learn Git?

#41
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! ...…

There is also "Think Like a Git" (http://think-like-a-git.net/), "The Git Cheatsheet" (http://ndpsoftware.com/git-cheatsheet.html) and "Git, the simple guide" (http://rogerdudler.github.com/git-guide/). This might just be piling on to your 'yet another tutorial' list but maybe one of these will help it click for you.

Re: Got 15 minutes and want to learn Git?

#42
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! ...…

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 these commits. Each commit links back to the change before it, forming a chain.

If a single person is working on a project, this may be a linear chain of commits, but if multiple people are working on the same project, two people might make a change to the same text at the same time.

So maybe one person writes "The Nexus 7 costs £159", and another person writes "The Nexus 7 costs $199". If this happened, the chain would split; you'd have two valid changes made to the same text. The act of reconciling these chains is called a "merge". We might choose to use one version or the other, or to combine the two, such as "The Nexus 7 costs $199 (£159)".

That's basically it. The only other thing Git does is to allow you to give commits a human-readable name so you can refer back to them later.

Re: Got 15 minutes and want to learn Git?

#43
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! ...…

[deleted]

Re: Got 15 minutes and want to learn Git?

#44
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! ...…

It sounds like the problem isn't git itself, but the concept of source control in general, which is pretty abstract until you actually dig into a source-controlled project that has other people committing - after that, the understanding comes pretty naturally.

Re: Got 15 minutes and want to learn Git?

#45
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 liked http://gitref.org when I started with git. I find it's a good quick reference to common git commands so you can quickly get up and running with git. The rest of learning git is really just practice and searching for how to do stuff when you need to.

The section on commit explains what the '-m' option is:http://gitref.org/basic/#commit

Re: Got 15 minutes and want to learn Git?

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

Re: Got 15 minutes and want to learn Git?

#47
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 know how you feel. I was working on a very basic project and since i had some hand-holding i used git to publish the code to github, but now the hand-holding has stopped (my mentor doesnt have time to help me) and i'm no longer pushing to Github (dont want to make all my code open source).

It was too much of a learning curve to figure out how to deal with this change where Git was concerned, so i went back to mercurial which has a windows client and is easy enough to get my head round.

I do think that Git is probably more powerful as i see it in much more use in production out there, and at a guess i imagine that for version control it's probably more dependable and reliable than Mercurial - im not really qualified to say - but right now, i'm sticking to mercurial because at least i can wrap my head around it, and that's what matters, for now.

Re: Got 15 minutes and want to learn Git?

#48
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! ...…

Of all the basic version control intros/books, for me nothing beats Version Control by Example[1] book. It first explains the core concepts/commands behind version control such as create, commit, etc and them it goes on to illustrate how these commands actually implemented and used in practice using different version control systems.

The explanation is given for both centralized version control systems, using SVN, as well as for distributed version control systems, using Mercurial and Git (and Veracity).

Give it a try. The digital editions (PDF/EPUB/MOBI) are free for download I think.

[1] http://www.ericsink.com/vcbe/

Re: Got 15 minutes and want to learn Git?

#49
I 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!!
Post reply on HN