Live data from Hacker News

Two-Minute Guide to Git

garyrobinson.net

21–30 of 35 posts

Re: Two-Minute Guide to Git

#21
post #6

Earlier quoted context omitted.

[deleted]

I'd argue that the one tool you need is something like git to make those small isolated snapshot copies for you. Learn a few commands and you won't have to worry about an ever-growing pile of directores that will just metaphorically topple over eventually. Then you can make changes ad hoc with confidence that you can quickly and easily revert if something breaks, without having to organize a smattering of cloned dire…

[deleted]

Re: Two-Minute Guide to Git

#22

This is a great little guide. Nicely done! But my suggestion would be to use a nice Git GUI instead of the command line. SmartGit is free for non-commercial use and is quite wonderful. It's both easier to use than the command line (by a long shot) and it's actually more powerful too. Many operations that take multiple command line steps are a single command in SmartGit. There is also SourceTree or the more limited Gi…

My philosophy is that when you use the command line, a) You learn the tool better, and b) wherever you are where there's git, you can use it. No need to install anything else.

I had that philosophy back when I used Subversion, and I think it served me well. It really isn't that hard to use the command line. Especially if you use the subset in my post. I also suspect that GUI tools will generally have the power to deal with staging, branching, etc, and may thus be harder for a total newbie to understand, and more intimidating, than the few commands I outlined in the post.

That's my take on it anyway. YMMV, of course!

Re: Two-Minute Guide to Git

#23
Nice summary. My only observation is that, in practice gitk --all and gitk -- have completely replaced their git log equivalents for me (and are more universally available than $RANDOM_GIT_GUI).

Re: Two-Minute Guide to Git

#24
post #21

Earlier quoted context omitted.

I'd argue that the one tool you need is something like git to make those small isolated snapshot copies for you. Learn a few commands and you won't have to worry about an ever-growing pile of directores that will just metaphorically topple over eventually. Then you can make changes ad hoc with confidence that you can quickly and easily revert if something breaks, without having to organize a smattering of cloned dire…

[deleted]

To be fair that's a failing of the git user interface. Giving up on the entirety of version control because one of them has a bad UI seems like overkill.

Re: Two-Minute Guide to Git

#25
post #2

My son is creating a software project for a independent study project in high school. I've been nagging him for a while to use version control, and he hasn't done it. I think it's a bit intimidating to be handed a 400-page book on git when he has plenty of other work to do. And also, he doesn't really know, from personal experience, why version control can save him a lot of pain. So he just hasn't taken the time. One…

Your useful guide aside: why not have him use mercurial? git has a very steep learning curve and an interface only a mother could love. Mercurial on the other hand has a clean interface very similar to svn, and has all the advantages of git that you list above. And can be straightforwardly run over apache to boot. Also the command is one letter shorter than git.

First, I know git, and not mercurial.

Second, I don't think there is a steep learning curve for the subset included in my post.

Third, I think git has enough momentum that it makes sense for beginning programmers to focus on it. I suspect Mercurial will get a lower and lower percentage of the market place over time, because programmers will generally need to learn git at some point, and once they've done so, there is less reason for them to go against the tide on their next project by learning Mercurial. (An "increasing returns" situation.) Maybe I'm wrong about this -- it's just the sense I have. But, see this chart, which I think tends to validate it: http://www.google.com/trends/explore#q=git%2C%20svn%2C%20hg&...

Re: Two-Minute Guide to Git

#28
post #2

My son is creating a software project for a independent study project in high school. I've been nagging him for a while to use version control, and he hasn't done it. I think it's a bit intimidating to be handed a 400-page book on git when he has plenty of other work to do. And also, he doesn't really know, from personal experience, why version control can save him a lot of pain. So he just hasn't taken the time. One…

My younger brother is doing his project and he uses TortoiseSVN on windows all by himself. I think that would be a better start.

Re: Two-Minute Guide to Git

#29
post #25

Earlier quoted context omitted.

Your useful guide aside: why not have him use mercurial? git has a very steep learning curve and an interface only a mother could love. Mercurial on the other hand has a clean interface very similar to svn, and has all the advantages of git that you list above. And can be straightforwardly run over apache to boot. Also the command is one letter shorter than git.

First, I know git, and not mercurial. Second, I don't think there is a steep learning curve for the subset included in my post. Third, I think git has enough momentum that it makes sense for beginning programmers to focus on it. I suspect Mercurial will get a lower and lower percentage of the market place over time, because programmers will generally need to learn git at some point, and once they've done so, there is…

Both are great, but for a beginner, I too feel that Mercurial is much easier to get started. You don't have to spend any time 'understanding' how it works, just 3-4 commands is all that it takes to use it.

> Mercurial will get a lower and lower percentage of the market place over time

Lots of big projects continue to use Hg, some even switching to it from Git (e.g. FB)

https://hg.python.org/

https://hg.mozilla.org/

https://code.facebook.com/posts/218678814984400/scaling-merc...

Re: Two-Minute Guide to Git

#30
post #2

My son is creating a software project for a independent study project in high school. I've been nagging him for a while to use version control, and he hasn't done it. I think it's a bit intimidating to be handed a 400-page book on git when he has plenty of other work to do. And also, he doesn't really know, from personal experience, why version control can save him a lot of pain. So he just hasn't taken the time. One…

i made a similar list when teaching others programming as well as for a friend so we could do some collaborative literary writing,

i think offsite storage, or publishing, is also of tier one importance and can be distilled to simple instructions:

(0) create an account with bitbucket for free private, or github for free public .. of course you will have to show 'git config --global user.name NAME' and 'git config --global user.email eMAIL@SITE.com', but this step is a one off and can easily be ignored after initial setup which you can be present for

(i) 'git remote add origin LOCATION', and 'git remote -v' if you forget where the repo is being sent

(ii) 'git push origin master', after ever session

(iii) 'git pull origin master', before ever session

Post reply on HN