Live data from Hacker News

Got 15 minutes and want to learn Git?

try.github.com

131–140 of 178 posts

Re: Got 15 minutes and want to learn Git?

#131
post #100

Can 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 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 s…

I haven't read any books or longer tutorials on Git. I find it easy to use and if I run into trouble I just Google after help (which happens a few times a week). Throughout the day I mostly use 9 Git commands. Here are the top 9 commands I use: git checkout X git checkout -b new-branch git commit git add; git mv; git rm; git pull --rebase git rebase origin/master git push origin X I have used this for a long time wit…

Reading through the comments here is infuriating, and it's no wonder people don't git what the big deal is.

With git you can share you current work to any arbitrary remote branch. The implications are your half baked feature can get pushed up and your coworker can do a checkout on the new remote branch. If they have suggestions they can make a change which you can cherry-pick off their branch into your branch. Also, you can branch off your current working branch, rebase master and merge their new branch in and push that up to master when everything works as expected. Try that workflow without breaking the central repo effecting everyone else's work in SVN.

Re: Got 15 minutes and want to learn Git?

#132

Earlier quoted context omitted.

> Just by operating from the command line you've already left the realm of "simple" in my opinion. Git is a tool for programmers. There's no excuse for a programmer to be uncomfortable with the command line.

I am a productive programmer and I am absolute uncomfortable with the command line. I can't count the times I have written svn commit -m "Finally fixed bug #123!" ...only to get some weird bizarro error because I should have used '' or escaped the !. This is usually when I am deeply focused on some programming language or bug #123. Tower.app is the only reason I've ever touched git, and the line-by-line staging and c…

I think this is a general problem with people with extreme addiction to IDEs and Windows based UIs.

I've known people in my team who can't do any work on the command line comfortably. I see this problem especially among people who work on Frontend and especially Java developers.

If a certain set of tools are making you dumber by the day, know it for sure that it will be automated or you will be replaced by lesser skilled cheap labor inevitably.

Re: Got 15 minutes and want to learn Git?

#133

Can 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 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 s…

I'm with you. Git is powerful but in terms of user interface it's a complete train wreck. It doesn't need more guides or tutorials as much as it needs a sane command line and help messages. There's space for a Git fork, or a higher level "porcelain", as Linus himself calls it.

Re: Got 15 minutes and want to learn Git?

#135
Nice, 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.

Re: Got 15 minutes and want to learn Git?

#136
post #132

Earlier quoted context omitted.

I am a productive programmer and I am absolute uncomfortable with the command line. I can't count the times I have written svn commit -m "Finally fixed bug #123!" ...only to get some weird bizarro error because I should have used '' or escaped the !. This is usually when I am deeply focused on some programming language or bug #123. Tower.app is the only reason I've ever touched git, and the line-by-line staging and c…

I think this is a general problem with people with extreme addiction to IDEs and Windows based UIs. I've known people in my team who can't do any work on the command line comfortably. I see this problem especially among people who work on Frontend and especially Java developers. If a certain set of tools are making you dumber by the day, know it for sure that it will be automated or you will be replaced by lesser ski…

> If a certain set of tools are making you dumber by the day

How does "not comfortable with the command line" translate to "dumber by the day?" If people get their training using IDEs and go on to be productive using primarily IDEs, how does being uncomfortable with the command line reflect on their intelligence in any way?

> know it for sure that it will be automated or you will be replaced by lesser skilled cheap labor inevitably.

Yes, the mundane, confusing use of the git command line is here to stay and the dumb "actually design and engineer an application" world of IDEs is going to be replaced by robots. You are a fucking genius. Only on the internet can such backwards and completely worthless logic be said because if you tried to say this shit to anyone in real life you'd be laughed out of the room.

Re: Got 15 minutes and want to learn Git?

#137

Earlier quoted context omitted.

Sounds like a false dilemma. Mercurial is here now, is powerful enough for a majority of users, is easy to use, and has an introductory book as well. After reading it and Spolsky's site, I picked it up in a few hours. I think git is a good fit for people who find version control theory interesting, a endeavor in itself, or have complex workflows. For the rest of us, who simply need to work together (sometimes offline…

I specifically wasn't comparing Git to Mercurial, and noted so in my comment, mostly because I don't have any real experience with it. It certainly might be easier to use than Git, I don't actually know. I also don't know how many people who bemoan Git's complexity and learning curve have tried Mercurial, or even used any version control, and how many are migrating from SVN or CVS.

hg is leaps and bounds simpler than git. I came from a long svn background and picked up hg in about a day.

hg to git took several weeks, and I'm still learning.

I prefer git's handling of branches; hg never deletes a branch, just "closes" it, so you're left with a lot of mess if you do a great deal of branching. Other than that, I prefer hg.

Re: Got 15 minutes and want to learn Git?

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

Rather than these n00b tutorials, I recommend reading "Pro Git" by Scott Chacon, available for free here: http://git-scm.com/book If you prefer a video, try "Getting Git" by Scott Chacon: http://vimeo.com/14629850 Coming from a Subversion & Perforce background, I was initially very confused by Git. There were two things that finally switched-on the old lightbulb for me: a) Scott's book b) Actively using Git for all o…

b) glosses over what I've found to be one of the biggest brain-twisters in git - working with remotes.

Re: Got 15 minutes and want to learn Git?

#139
post #132

Earlier quoted context omitted.

I think this is a general problem with people with extreme addiction to IDEs and Windows based UIs. I've known people in my team who can't do any work on the command line comfortably. I see this problem especially among people who work on Frontend and especially Java developers. If a certain set of tools are making you dumber by the day, know it for sure that it will be automated or you will be replaced by lesser ski…

> If a certain set of tools are making you dumber by the day How does "not comfortable with the command line" translate to "dumber by the day?" If people get their training using IDEs and go on to be productive using primarily IDEs, how does being uncomfortable with the command line reflect on their intelligence in any way? > know it for sure that it will be automated or you will be replaced by lesser skilled cheap l…

How does "not comfortable with the command line" translate to "dumber by the day?" If people get their training using IDEs and go on to be productive using primarily IDEs, how does being uncomfortable with the command line reflect on their intelligence in any way?

I agree with you completely. Being familiar with the idiosyncrasies of the console does not make you smarter than people who aren't; you've just learnt different things.

You are a fucking genius. Only on the internet can such backwards and completely worthless logic be said because if you tried to say this shit to anyone in real life you'd be laughed out of the room.

You went off the rails here. You can disagree without being abusive. Downvoted, sorry.

Re: Got 15 minutes and want to learn Git?

#140

Earlier quoted context omitted.

> Why is there a staging area in the first place? Because you don't always want to commit every change you've made or every new file you've added. > If a commit doesn't push my changes to a remote repository, why do I care? If I have my code in a working state, I'd like to save that "version" somewhere, so I can make a whole bunch of changes without worrying about whether or not I can get back to a working state. Thi…

What disturbs me about that workflow is that your commits have literally never been tested because the staging area contents aren't accessible as a working copy. I for one am adamant about not littering my history with all my crap that didn't run, so I much prefer to commit the mixed work and then rewrite history to tease out and regress the independent changes. I pretty much always test and commit my workspace as-is…

> It'd be easier if I could stash some but not all of my changes to get them out of my workspace temporarily

It's literally called "git stash".

Aside from that, you can squash commits together after-the-fact. If it makes it any easier, you can squash a whole branch together all at once before pushing it out to other people. No one need be the wiser. The intermediate commits can just be temporary savepoints for your personal convenience.

Post reply on HN