3 ms·
The reason git is hard to learn is because people when starting think it should be easy to learn from the commands, which it isn't. The way to learn git is to u
by karmakaze 3y ago
The reason git is hard to learn is because people when starting think it should be easy to learn from the commands, which it isn't. The way to learn git is to understand its data handling. Then you can group the commands. Once you have a mental model that closely matches how git works, things fall into place. Of course the learning curve could be made easier by naming some commands closer to the data that it handles, but I prefer short commands for common operations.
The best way I learned git was by browsing the files and contents of those files in .git/. That way I had an idea of what's possible and what I wanted to do and could find the command to do it.
How many git commands do I commonly use?
status, log, whatchanged, diff, diff --cached
add, reset HEAD, reset --hard, checkout, branch, commit, commit --amend
fetch, push, push --force-with-lease
stash, stash pop, rebase -i, reflog (escape hatch)
I hear similar difficulties from some who learn databases from using ORM syntax and don't have a mental model that matches how relational sets compose or how SQL is primarily declarative rather than imperative.