4 ms·
This seems to try to get the reader familiar with commands in a verbose sort of way, but IMHO, that's not exactly the best way. See for example the section on
by msravi 9y ago
This seems to try to get the reader familiar with commands in a verbose sort of way, but IMHO, that's not exactly the best way.
See for example the section on branches - it tells you to run certain commands (checkout -b) without telling you what's happening in the background. So while you kind-of get a feel for the command in the context it's being explained, you wouldn't know how to apply it to your context, unless your workflow and context is the same.
On the other hand, if you look at how branching is dealt with in the "official" book (https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-N...), it tells you very clearly what each command is doing in the background so you know exactly what's happening. Once you understand that, you know git.
- IndrekR 9y ago> it tells you to run certain commands (checkout -b) without telling you what's happening in the background I guess this is why it is called A Usage-First Guide to Git. You can always dig deeper, but in most cases people just starting out with git want to get things done without their heads exploding first.
- barrkel 9y agoUnderstanding git's data model is the correct route to avoid head explosion, because it's both simple and every other feature fits in within the mental model. Git is by far the simplest SCC system I've used because it is so easy to understand the data model. It lets me intuit the existence of commands because I know the kind of data model manipulation I want to apply and all I need to do is find the right incantation.
- wastedhours 9y agoThere's no "correct" route. The logical way into tackling a subject to you might be different to someone else. The "see it in action and delve into more details later" approach might not be the way you see the best practitioners developing their skillset, and starting at the theoretical basics and building from there might be the more academically rigorous approach, but it can be effective approach to directing learning. If I was learning Java, I'd want to get cracking on developing a "Hello World" application before trying to understand the JVM.
- msravi 9y agoYes, but this particular tutorial is just exceptionally bad. It doesn't even tell you in plain English that a new branch is being created - it just says nothing seems to have changed with -b, that an overwriting seems to be an illusion, and that you can restore the original by checking out master! The author seems to have gone to extraordinary lengths to not use the term "branching". That does not help in usage, despite being termed Usage-First From the tutorial: We have created a Git repository that tracks one text file containing a certain message. Now type: $ git checkout -b boss # nothing seems to change after this $ echo "My boss is smarter than me" > myfile.txt $ git commit -a -m "Another commit" It looks like we’ve just overwritten our file and committed it. But it’s an illusion. Type: $ git checkout master # switch to original version of the file and hey presto! The text file is restored.
- IshKebab 9y agoIn my experience the only way I learnt how git works was by being forced to use it, and to do that you need to know the commands that do things first. You don't need a deep understanding of git's internals to use it, despite what most people seem to think. I also found Git much easier to understand with a GUI client so you can easily see the state of the repo. GitX is a good one (on Mac).