I don't understand this fad that programmers should know only first principles, and shun checklists in favor of deriving everything from scratch every time.
I know how my car works but I still pull out the service manual when I need to change an air filter. Nothing under the hood is 'black magic' but seeing the procedure written out saves me a ton of time.
And: git commands are hard, even if you understand the underlying data model. (I've only been using it for 8 or 9 years. Maybe I'm just too dumb?) Understanding the data model won't help me remember that the "--amend" flag is how I edit the commit message (though I could probably build it myself from reset + commit, if I really wanted to), or what folder I should put global pre-commit hooks in.
I don't understand this fad that programmers should know only first principles, and shun checklists in favor of deriving everything from scratch every time.
I know how my car works but I still pull out the service manual when I need to change an air filter. Nothing under the hood is 'black magic' but seeing the procedure written out saves me a ton of time.
The problem is that the explanations of the commands are wrong.
Reset does not undo a commit. It moves HEAD and updates the work tree. I have no problem with cheat sheets and quick references. Memorizing the commandline interface is not important. Use a cheat sheet. Handwaving over what the commands you are running actually do is asking for trouble.
Edit:
I was witness to a similar debate on IRC the other day. Someone insisted but you can't learn Python without understanding the underlying data model of strings in C. IMO that is ridiculous because the abstraction in Python is close to airtight; you just about never need to think about the implementation of strings when using strings.
Git, on the other hand, frequently exposes implementation details to the user. Casual users are likely to run into edge cases that don't understand. You basically can't resolve rebase conflicts effectively if you don't know what "ours" and "theirs" means. The man pages are indecipherable if you don't know what blobs and trees are. You don't need to teach people that stuff on day one, when they first learn about pull, add, commit, etc. But you had better teach them soon. I see no reason why a discussion of rebase couldn't at least casually explain how it's implemented: "check out base branch, cherry-pick commits from rebased branch", is that so hard? If they don't understand what a common ancestor is, how are they expected to know when to use --onto?
I know how my car works but I still pull out the service manual when I need to change an air filter. Nothing under the hood is 'black magic' but seeing the procedure written out saves me a ton of time.
And: git commands are hard, even if you understand the underlying data model. (I've only been using it for 8 or 9 years. Maybe I'm just too dumb?) Understanding the data model won't help me remember that the "--amend" flag is how I edit the commit message (though I could probably build it myself from reset + commit, if I really wanted to), or what folder I should put global pre-commit hooks in.