3 ms·
> 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 Guid
by 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.