* pull
* push
* checkout / switch
* commit (ofcourse)
* merge
But I will end up needing
* log / log --stat
* stash
* diff
* show / show --stat
* blame
* revert
* cherry-pick
* reset
* git grep (can be replaced with rg / grep -rn)
I can't imagine not having these commands now.
If you use something frequently you should know it in-depth. It applies to tools (git, VSCode), frameworks (Spring, Django, whatever), infra (kubernetes, docker). otherwise you're missing out.
I prefer to remain oblivious to many things. Two views of the Mississippi and all that.
Git works reliably and achieves my humble expectations. Thanks git.
But in reality I use about the same set of commands. The exception being ‘cherry-pick’ which I avoid solely on disliking the name.
git alias --global pick cherry-pickGit is definitely abstract and hard to get the hang of but totally worth it - pays dividends in terms of the options it puts at your disposal. And the stimulating nature of learning how it works so that you can think for yourself to figure out a solution, instead of just memorizing 3 commands and running to AI for help when you get a little stuck.
- pull
- push
- commit/checkout
- merge
Quality of life:
- stash
- diff
Asking for trouble:
- revert
- cherry-pick
Your definition matches my mine of a tight subset of git.
This was my approach for my first few years of git. I always tried to approach git via its commands, and I horribly failed - until I finally took a little bit of effort to understand how git actually works under the hood, which really made it click for me.
For anyone who has ever spent a modicum of time (e.g. while getting a CS degree) trying to understand datastructures, it's probably really straight-forward to "get git". The datastructure underneath is really quite simple. A branch is a pointer to a commit, a commit is a pointer to a tree, a tree is a list of pointers to other trees and files. That's already pretty much all there is to it.
Once the datastructure of git is understood, the commands start to "make sense" on their own - at least most of them. They still have tons of obscure options that one doesn't realistically need in a daily work flow, but the general idea what the commands do (and how to recover from screwups) was, at least for me, pretty simple after understanding the datastructure.
Maybe a lot of people don't care about that, and I guess everybody has their threshold, where as long as they know the minimum required to do their job they can stay in that comfort zone typing the same commands over and over.
Would I like to know more about the underlying ideas of Git. Yes. But the time it would take me to do that is time I can spend on other things, like the stuff I am actually paid to do. If I become a git guru, I might get a pat on the back, but more likely no one would care. If I deliver more stuff, people who use my stuff actually appreciate it.