News for hackers. Stuff that matters.
Re:A simple guide for getting started with git by skrebbel on Monday January 09, 2012 @10:03AM (#3442727)
I don't get this. Sure, the tutorial looks very pretty, but it does not explain any concepts.

"Create a new repository." What is a repository? What do I do with it?

The HEAD is a tree "which points to the last commit you've made". Huh? A tree can point? The one in my garden can't. Also, what's a commit? I thought "commit" was a verb, not a noun.

And so on.

It's nice that people want to make something as complex as git accessible, so I applaud the effort. Nevertheless, this just makes me feel like a moron for not finding it simple. After all, the layout and the pictures make me feel like I should find it simple. But I don't, so it must be me, right? I think it's tutorials like these that keep people on TortoiseSVN.

Re:A simple guide for getting started with git by eggbrain on Monday January 09, 2012 @10:50AM (#3442923)
I agree with you in general, but I feel like you take a wrong perspective of it.

The author takes a top-down approach to teaching, which basically means that he thought about this tutorial from his perspective, someone that was already intimately familiar with the details. This, as you pointed out, is wrong. If this is a tutorial for beginners, you need to have some explanation of what "checking-out" means, what "trees" are, etc. If this tutorial is for advanced users, however, its too sparse to give any new information. So in the end, the tutorial is pretty, but helps neither advanced users nor beginners.

I feel like the examples you give, however, are inefficient for a guide as well -- at what point do we start making assumptions about the reader? For example, you give the example that a beginner might not understand trees, but how do we know they understand anything? Do we believe they don't know trees, but do know how to program, and if so, to what level? Do we assume they are proficient in the terminal, and can even install git if it is not already present? The problem with your approach is that it seems like there's never a point at which we stop.

When I learned a new romantic language (Spanish), we didn't start all the way at the beginning with the alphabet, nor did we try to explain conjugation, past participles. We started with simple phrases -- "Hello", "How are you", "The weather outside is nice", without a real understanding of why we said them. Then, over the years, we peel back the onions of why phrases were the way they were -- Adios (goodbye) was a combined form "A dios"--to the gods. But you shouldn't try to teach that from the onset as you'll overwhelm the learner -- you just continually add on layers until they discover themselves.

Similarly, I feel like for this scenario, a tutorial should set up a scenario that fits the commands perfectly -- don't explain why we use git commit -m, have the first user just go through a few scenarios where they just do it. Then, as they learn, build advanced git tutorials that add on layers, so suddenly they start to uncover all the nuances that git has to offer.

Now, granted, that doesn't extend itself to a "simple guide" if you will, but I feel that these iterative examples that let you think are much better.

Re:A simple guide for getting started with git by ImprovedSilence on Monday January 09, 2012 @12:43PM (#3443440)
Coming from my perspective (I'm familiar with the concepts of version control, and and a good enough high level understanding of it, but I don't know how to use git and it's commands), I found this very useful and informative. I suppose you could break down knowledge of git into 2 types, WHAT it does, and HOW to use it. I think this tutorial fails at the first part (or doesn't care about it) but is tremendously useful for the second part. It's just a good starting point for someone like me, who knows what it is, but doesn't know how to use it yet.
Re:A simple guide for getting started with git by jasonkester on Monday January 09, 2012 @12:25PM (#3443339)
Indeed. I've been using source control of various flavors for 15 years now, and that "Trees" section is completely unparseable by me. Why are there 3 of them? Why do I care that there are 3 of them? What do I use them for? If I don't use them all directly, why are we talking about them?

Further, why are we talking in terms of the actual command-line commands? Surely a version control system as popular as this has tools at least as good as TortoiseSVN so that I don't have to actually type commands into a command prompt like some bearded guy from the '70s. I'd much prefer you tell me the name of the popular Windows/Mac client and walk me through the workflow I'll actually use on a day-to-day basis.

Re:A simple guide for getting started with git by Hemospectrum on Monday January 09, 2012 @02:44PM (#3443932)
> Further, why are we talking in terms of the actual command-line commands? (...) I'd much prefer you tell me the name of the popular Windows/Mac client and walk me through the workflow I'll actually use on a day-to-day basis.

To be perfectly clear, the command line tools ARE the popular client. The only widely used GUI I'm aware of is the one specific to Github. There are others but they generally expect you to be familiar with the command line workflow. Perhaps this is because Git is easily integrated into IDEs in a way that makes sense for that particular IDE; perhaps it's because the command line interface is actually very good, with features like spelling suggestions (if you've mistyped a command name) and autocompletion scripts (sort of like IntelliSense).

By the way, I can't speak for Windows users but the overwhelming majority of Mac and Linux developers are well aware that their shiny GUIs are thin layers over the gross 70s Unix parts underneath. In this world there's no stigma concerning beards or the 70s, and your dismissal of the command line comes across as backwards and absurd. It's a bit like badmouthing non-Hollywood filmmakers because a lot of them work in foreign languages and you "don't want to read some German thing for four hours" when you go to the movies.

Re:A simple guide for getting started with git by spacemanaki on Monday January 09, 2012 @03:02PM (#3443998)
To be honest, if you're going to use Git you probably need to at least become familiar with the vocabulary of the command line interface, even if you never use it. This is because so much of the documentation (including unofficial tutorials) and even interfaces of most of the GUI clients are set up to use the same words. This is actually basically a good thing, I think, because it means that switching from one GUI client to another isn't a big deal.

Furthermore, it's possible that the real reason so much of the unofficial Git docs just talk about the command line rather than point you at a GUI client (except for documentation for those clients themselves of course) is that the Git GUI clients are still under so much development and in some cases are really lacking basic features (for instance, last I checked, the TortoiseGit client did not support any way of interacting with the index/staging area, which is a pretty important part of Git).

I think the parting words of the tutorial "Git from the bottom up" described Git as a library for building a version control system, or something like that, and suggested that we have only just begun to see what people can do with it. I kind of like that idea, that maybe it's possible to bury the complexity of Git underneath a really high level interface, although I don't think that I would actually use it. Git's complicated but it's definitely not rocket science. Plus I generally prefer the command line.

Re:A simple guide for getting started with git by tanoku on Monday January 09, 2012 @12:44PM (#3443443)
> I don't have to actually type commands into a command prompt like some bearded guy from the '70s

Really? I mean, really?

Re:A simple guide for getting started with git by jasonkester on Monday January 09, 2012 @01:05PM (#3443549)
Absolutely. I am aware that lots of developers seem to like the command line, but I can't for the life of me understand why. I think visually, so looking at a visual interface such as Windows Explorer is several orders of magnitude more productive than fiddling around with cd/ls to give me a picture of what's going on. Once I find what I'm looking for, I'd much prefer to right click on it and get on with my day than open up a terminal, type out a path, then try to remember some archaic command syntax.

As I say, lots of programmers claim to be more productive from the command line than they are in a visual interface. It doesn't make much sense to try to dispute that, but I still find it quite baffling.

Re:A simple guide for getting started with git by vectorpush on Monday January 09, 2012 @06:19PM (#3444809)
>am aware that lots of developers seem to like the command line, but I can't for the life of me understand why.

I used to think exactly like this. It takes a while to get used to the CLI workflow, you only start to reap its benefits once you've gained a solid understanding of unix and also developed the autonomy to select the right CLI tools (e.g. tmux, zsh, vim, git) which creates synergy at every tier of your development stack.

I have written software on Windows and Linux, and when it comes to most tasks related to software development, GUIs tend to get in the way. GUIs are useful at first because all your options are laid out before you, but the complexity increases since the functionality of the entire system must be abstracted through a visual interface.

Re:A simple guide for getting started with git by romaniv on Monday January 09, 2012 @02:49PM (#3443953)
I don't think it's a matter of programmers being productive per se. The greatest benefits of command line are the ability to easily store, share and reproduce actions. It's just text. You don't need screenshots to explain something, and everything is scriptable.
Re:A simple guide for getting started with git by mquander on Monday January 09, 2012 @02:50PM (#3443958)
Note that source control in particular is particularly amenable to the command line, since the output of source control commands is blobs of text that refers to text files on disk; grepping around in it and wanting to access, process, or modify those files by name is a common operation.
Re:A simple guide for getting started with git by adrianmsmith on Monday January 09, 2012 @05:20PM (#3444581)
I'm not sure I agree with that; I mean I use TortoiseSVN and before that TortoiseCVS as my main interface to version control, and have done for the last 10 years. It works perfectly and I don't feel I'm missing the command-line at all.

(A goal of Subversion was that its command-line commands produce output which is both easily parsable by humans and machines. But still, I never use it.)

Re:A simple guide for getting started with git by VMG on Monday January 09, 2012 @02:09PM (#3443796)
Well, as a bearded guy from the 2010's, I prefer the command line to visual interfaces for the same reason I prefer C to LabVIEW.
Re:A simple guide for getting started with git by dustingetz on Monday January 09, 2012 @11:32PM (#3445697)
do you write your programs in sharepoint designer, too? ;)
Re:A simple guide for getting started with git by nessus42 on Monday January 09, 2012 @03:37PM (#3444131)
>I don't have to actually type commands into a command prompt like some bearded guy from the '70s

Really? I mean, really?

Kids today!

Re:A simple guide for getting started with git by ender7 on Monday January 09, 2012 @10:21AM (#3442805)
As someone who is used to SVN and Mercurial, I found this pretty useful. The author's going to have to decide what the intended audience is - people who have never used SCM, or people who are considering switching from another SCM (probably SVN).
Re:A simple guide for getting started with git by jmilloy on Monday January 09, 2012 @11:30AM (#3443090)
Presumably I know why I want to use git before I look at this guide. Also, I know what a repository is (in the English sense), but just in case, I typed define repository into google: "A place, building, or receptacle where things are or may be stored." Now "Create a new repository" really is dead simple.

The term commit and it's function are made clear in the "add and commit" section. Perhaps the order of "trees" and "add and commit" should be switched, but this hardly makes the guide unusable.

If in doubt, type the commands and see what happens. And, at the very very least, the article is titled "git - the simple guide", not "version control terminology - the simple guide".

Perhaps not everyone is the intended audience, and perhaps some people could supplement this guide with additional reading. I've never used git, and I found this guide clear and useful.

Re:A simple guide for getting started with git by pixeldude on Monday January 09, 2012 @10:05AM (#3442741)
Thanks for your feedback! I completely understand your point. Maybe it would make sense to make another guide with an intro on Source Control Management systems and link it in the git guide. Currently, you need to have a little bit of knowledge on an SCM. But I will think about it.
Re:A simple guide for getting started with git by skrebbel on Monday January 09, 2012 @10:11AM (#3442757)
Hmm, I'm not sure "having a little knowledge on an SCM" does the trick. Let's assume that I've used subversion for years (which surely is SCM). Therefore, for instance, I know that a repository is something on a server that can hold all relevant for my current team (we'll checkout a subdir for each of subproject). Also, I know that committing means sending a change to the server. I also know that I can lock a file and then nobody else can commit it, handy!

The meaning of nearly all SCM-related terms in your tutorial are highly git-specific. Making an SCM intro does not really help that. You need to make a git intro.

Re:A simple guide for getting started with git by markkanof on Monday January 09, 2012 @10:51AM (#3442930)
I don't know if they are necessarily Git specific, but probably are distributed version control system specific. For example the concept that committing would record your changes to the local repository wouldn't make any sense to a Subversion user, but would make a lot of sense to say a user of Mercurial.
Re:A simple guide for getting started with git by pixeldude on Monday January 09, 2012 @10:19AM (#3442797)
Yes, you might be right on this. I will think about it. If you have links where something like this can be found, i would appreciate it. Thanks!
Re:A simple guide for getting started with git by kalid on Monday January 09, 2012 @12:54PM (#3443496)
Hi, shameless plug but I've found people enjoyed these two guides on traditional version control and distributed version control:

http://betterexplained.com/articles/a-visual-guide-to-versio...

http://betterexplained.com/articles/intro-to-distributed-ver...

One technique I use is trying to explain the underlying concepts using analogies to what people already know. Most people are familiar with using "Save as..." to create MyResumeOct2010.doc, MyResumeFinal_v1.doc, MyResumeFinal_REALLY.doc, etc. Version control is like a beefed up, automatic "Save as...". You can jump to any version without a mess of different files.

Distributed version control lets you "peel off" individual changes and send them to anyone. If you are making a shopping list with 3 people, you can "peel off" the items that Alice, Bob and Charlie added and put them on your own list.

Once the concepts are clear, you can give them proper names (diffs, revisions, commits, etc.) and things start to click. Anyway, that's what I've found helpful, good luck!

Re:A simple guide for getting started with git by dgallagher on Monday January 09, 2012 @12:08PM (#3443243)
I found this guide very useful, so thanks for making it. :) I've used SVN, Mercurial, and git before, so knowing those made this easy to digest. Plus it covers stuff about git I never knew existed, like gitk. So cool!
Re:A simple guide for getting started with git by necolas on Monday January 09, 2012 @02:10PM (#3443803)
Your feedback is probably exactly what the project needs in order to become a better introductory guide. As such, I'm surprised the site doesn't include an obvious link to the GitHub repo/issues [1] so that people who have not been enlightened, or want to contribute better explanations, can share what needs to be clarified.

[1] https://github.com/rogerdudler/git-guide

Re:A simple guide for getting started with git by pixeldude on Tuesday January 10, 2012 @09:29AM (#3447014)
I've added the link on the site. Thanks for the hint!
Re:A simple guide for getting started with git by zallarak on Tuesday January 10, 2012 @02:10PM (#3448461)
If you want an easier/more clear guide that the one linked, follow their first-time use tutorial. Learning how it works is as simple as installing it and running their tutorial; it wouldn't take you more than 15 minutes.

Again, as a beginner, I would tell you that I find git very simple and effective and would strongly encourage you to check it out. Glancing at your profile and comments, I think you'd find it very easy: http://help.github.com/

Here is an image that might clear up some of your questions: http://en.wikipedia.org/wiki/File:Git_data_flow_simplified.s...

Re:A simple guide for getting started with git by msinghai on Monday January 09, 2012 @11:00AM (#3442965)
If you want to learn, get that version control book by Erik Sink. And like other best things in life, it's free (including shipping).
Re:A simple guide for getting started with git by g3orge on Monday January 09, 2012 @02:08PM (#3443785)
Yes. But I think it mainly is a guide for starters with git. It is not supposed to be a full-on guide for source code management.
Re:A simple guide for getting started with git by lien on Monday January 09, 2012 @08:39PM (#3445243)
looks like this is a list of "how to" instructions than why use git. take it for what it is.

I actually have used both tortoiseSVN and git, and I'm actually in love with git!

you should give it a try.