Live data from Hacker News

Two-Minute Guide to Git

garyrobinson.net

1–10 of 35 posts

Re: Two-Minute Guide to Git

#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 problem is that even if he googles "git" to find a simple guide, it talks about the server interactions which, frankly, aren't necessary for him for a project like this, and make things a lot more complicated. He's not sharing code with anyone. And he backs up his hard drive regularly, so he's not worried about losing all his code due to a hardware failure.

As opposed to Subversion, git can be used usefully without a server (including the possibility of a local server process), which actually makes git easier to get started with than Subversion.

So I wrote him a very brief guide for that kind of very simple, one-person use. Another benefit: when he needs to share code, and starts to feel the need to do things like branching, he'll already know some basics of git and so it won't be a big jump to start harnessing more of git's power.

I thought I'd post my guide it to HN in case anyone else finds it useful for that type of situation.

Re: Two-Minute Guide to Git

#3
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 Git GUIs for Mac and Windows from GitHub, but SmartGit is my favorite.

Maybe I'll take your writeup and convert it to a similar guide for SmartGit! :-)

Re: Two-Minute Guide to Git

#4
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 would add "you don't have to list any filenames on the commit line - use -a for all of them, or add them again one by one (or in groups) before calling git commit.

Re: Two-Minute Guide to Git

#5

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…

definitely this. TortoiseGit, for instance, makes everything laughably easy for 95% of most workflows. For the other 5%, you can always drop down to commandline/terminal and then you really need to know what's going on.

Re: Two-Minute Guide to Git

#6
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…

[deleted]

Re: Two-Minute Guide to Git

#7

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…

GUI tools are nice in some situations, but I find they mostly slow me down. When I'm using Git I want to be fast and a hot-key command window plus the command line is about as fast as you can get.

Re: Two-Minute Guide to Git

#8
post #6
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…

[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 directories yourself.

I guess what I'm saying is, the highest ROI for version control is to learn git add, git commit. At least you have the history well-organized for you down the road, with minimal effort on your part. If you need to revert at some point, you can just figure it out when you need it.

Re: Two-Minute Guide to Git

#9
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…

You can use subversion without a server; it's especially easy on Windows with TortoiseSVN. TortoiseSVN is one of the easiest tools to use for version control for single-person projects.

http://tortoisesvn.tigris.org/faq.html#noserver

http://stackoverflow.com/questions/2940276/how-to-use-svn-wi...

Post reply on HN