This book is super helpful and I referred to it in the past while I was learning Git. I want to note though that Git is pretty complex and trying to learn it all at once is going to be extremely frustrating. Instead, just start by learning the basics (push, pull, commit, clone, add, and maybe a few others). Then, when you have a specific problem that you don't know how to solve (How do I combine all these tiny commits into one substantial one?... or, I screwed everything up, how do I revert to a previously good commit?), look it up or Google for it. I still learn new things about Git this way and I think I know my way around it pretty well. It's amazing that pretty much anything I can think of Git already has implemented.
> Instead, just start by learning the basics (push, pull, commit, clone, add, and maybe a few others).
That's how I learned it but quickly I felt like I was missing important things and didn't really understand the tool. Then I took the time to read pro git and realized it is actually pretty simple.
Git has became so ubiquitous that I think it's worth spending some time to understand it thoroughly.
"understand it thoroughly" is key. I deal with a lot of programmers who are new to git, and the first thing I always do is to take them through the material in sections 10.1-10.3 of this book. Once a person has those fundamentals (which are not complicated at all), they're most of the way there.
A great deal of the confusion around more advanced tasks (rebasing, etc) is removed when working from those first principles of the system.
I just taught git to my boss and a coworker. They both use Windows exclusively and don't touch a command line. I was able to teach them the basics (push, pull, clone, commit, status) and they learned very quickly. I told them to ignore the other commands for now, but look up how to use them when they need them.
What's the best approach to using fit on Windows? I am comfortable with git basics on the Linux command line, and I want to teach it to students who are using Windows.
Is there a windows command line version, or is there a GUI version I should start them on?
If you run the default Git windows installer, it installs something called "Git bash" which is basically msys (part of mingw) with git included, which gives you command line access to git very easily. If you want to teach them the CLI way from the start, that is the way to go.
You can teach them how to use the git command-line interface without forcing them to use Bash, though. Nothing wrong with simply putting `git` in your path.
As someone who used Windows for development for a long time, depending on what languages they're learning, using Bash is a much better idea than `cmd.exe` or PowerShell. The latter is quite nice, but when you're using *nix based software, the differences between the two are great enough to cause (at least for me personally) a bit of confusion.
I'm coming from it from the other direction: I'm a long time Unix guy who has crash landed on Windows. I find any Unix-like environment on Windows to just be an atrocity. Cygwin and mingw are both embarrassing compromises that are so middling as to be nearly pointless. And I like the Bourne shell syntax.
It seems cruel to make somebody relearn their command-line interface only to give them the neutered, confused interface that Git Bash provides.
Personally I install git from their website and tick the middle radio option to use git from the normal command line. I live in the powershell.exe console all the time.
You might want to see the cmder project it can come with a build that includes it all ready to go. http://bliker.github.io/cmder/
I was discouraged by early releases of SourceTree for Windows because it was buggy. I believe it has improved by now, but I got used to Git Extensions already. It's open source and written in C#, by the way - I keep on planning to fork it and make it more to my liking, just can't find time for that :)
If I recall well, the GitHub app doesn't provide any branch visualization, correct me if I'm wrong.
Git Extensions could be a good choice for teaching, because you get a preview of what commands are being executed by the client. It's not a blackbox that hides what Git does underneath.
I know that real programmers only use command line (and chew bees), but GUI client is really helpful for grokking a complex history with lots of branches, merges etc.
I hate to make a "what he said" comment, but this is really excellent advice for beginners with git.
Just learning the very basic actions will get you up and running to gain experience. I have found that many nuances of git are difficult to learn by reading theoretical examples, but fairly easy to understand once you encounter and research a similar problem in your real workflow.
If you have co-workers whose workflow you can copy then I don't think it is needed, but if you want to start a project from scratch with Git then having a plan like this can be really helpful.
That is dangerous - you could very well be missing out on very important features all along the way without ever knowing it, wasting tons of time and productivity in process. This happens also when you directly start using an appliance without reading its manual first.