Live data from Hacker News

A simple guide for getting started with git

rogerdudler.github.com

91–100 of 132 posts

Re: A simple guide for getting started with git

#91

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 gi…

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 too…

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

#92
post #64
post #62

Earlier quoted context omitted.

Well, we use Git at my work, and I have a vague idea of what a repository is... But not really. I also have to say this: > I believe that somebody googling git usage is going to be a little bit conversant in the topic of version control. So you seriously believe somebody trying to learn about version control will already know about version control?

Well, you proved me wrong, but a few minutes ago I did believe someone googling about git would know something about version control. For the same reason that I believe someone googling about haskell or erlang probably knows something about programming.

Also someone googling about recursion probably knows something about recursion (e.g. that he is googling for it).

Re: A simple guide for getting started with git

#94
post #82

Earlier quoted context omitted.

It is very much like dropbox, in that a repository is a special purpose folder that the git application can run against. One difference is that you can have multiple of these folders, not only on your local machine but also on remote servers.

So let me see if I get this right. A repository is like a slave folder to a master folder, when the master folder is updated (the github folder) the contents are automatically copied to all repositories. In this way, it saves from having to update all folders manually and keeps everything in one place, with only one thing needing changes, which then propogate automatically to where they are needed? Any idea what vers…

i use git and here's an example.

you can think of a repository as a git-aware folder of code. if you go into your My_Documents folder, type `git init`, it's now a repository. if you click New Repository on github.com, navigate back to your local My_Documents repo, type `git remote add my_github_repo git@github.com:brador/my_documents.git`, you can then push your local repo into that repo with `git push my_github_repo` from your local repo. or if someone else commits to my_github_repo, you can pull changes downstream with `git pull my_github_repo`. git will check repos against eachother for conflicts.

i don't think a "master folder" really makes sense. if you're developing an app, you generally start with that local git init repo, and then you may push it to github. but then you may delete that local repo or go to another computer and type `git clone git@githjub.com:brador/my_documents.git` and it creates a local repo that you can resume working on. i think the point of decentralized version control like git is that there doesn't need to be a master repository. you can always merge repositories into eachother.

Re: A simple guide for getting started with git

#95

I think git is not easy to use, and the proof of that is that at least once a month there is a "how to use git" tutorial on the front-page of HN. I'm not saying git is a totally bad system, but I disagree with people who think git is easy to use. You don't see thousands of tutorials on the web, and tutorials hitting the HN frontpage on "How to use Subversion", "My personal Subversion workflow", "My .bashrc file conta…

I think tutorials just follow what's hot and what people are using, not necessarily what people have trouble understanding. Git is central to HN as a community, so we upvote things like git articles, and other HNers are more likely to try to learn git because of exposure. Coding projects on HN generally link to a github repository. Someone might create a new git cheatsheet tomorrow, but it doesn't indicate that nobody can understand any of the other git cheatsheets you can find in a google query.

See, we also incessantly upvote the latest oneword.js "gimmick", and it'd be inaccurate to assume that these javascript weekend projects fill any sort of demand half the time just because they're so prevalent. I think the community just tends to circulate things that it uses and has an interest in.

Re: A simple guide for getting started with git

#96
post #60

Earlier quoted context omitted.

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 too…

> I don't have to actually type commands into a command prompt like some bearded guy from the '70s Really? I mean, really?

>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

#98

It is neither helpful to an expert, nor to a beginner. A beginner will have no clue what the article is talking, like tree etc. An expert cannot really use this as a quick reference or something. Looks flashy, but is it anything more? I would recommend http://gitimmersion.com/

I have been using Git for a couple of weeks for my personal projects and got frustrated with it. I literally just finished moving all of my stuff back from Git to SVN before checking HN and reading this. The link you posted is making me have second thoughts and now I want to give it another go. Thanks... I guess.

Re: A simple guide for getting started with git

#99
post #79

"There's just one thing, Dude. Do you have to use so many cuss words?" -- Big Lebowski Joking aside, there is really no need to ruin a great guide by swearing in the subtitle. I'm not sure I'll ever understand why developers think they need to swear in articles. In this instance, is it because the author is writing in nerd (addressing a seemingly technical concept) and needs to show his article has some universal acc…

Holy stuff, Batman, you're the guy using the word "doo-doo" unironically while asking adults to "show some maturity".

Hehe, sorry. The "doo-doo" was used sarcastically - meant to show exactly how out-of-place it is to talk about excrement (using any synonym) in the context of a git tutorial.

Next time I'll be sure and add in my tags for clairty.

Re: A simple guide for getting started with git

#100
Hey pixeldude, there's a lot of negative feedback on here that seems pretty hostile in tone. Don't let it get you down. It's not perfect yet, but you're writing something that I specifically wanted to give others at multiple points in the past.

Some constructive criticism: don't align=center absolutely everything, it makes it difficult to read larger sections of text. If everything is centered, then nothing is centered.

Post reply on HN