4 ms·
I use the following commands frequently * pull * push * checkout / switch * commit (ofcourse) * merge But I will end up needing * log / log --stat * sta
by never_inline 2y ago
I use the following commands frequently
* 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.
- mlhpdx 2y ago> If you use something frequently you should know it in-depth. 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.
- fragmede 2y agowhat would you call it instead? or does the word cherry have some weird association in your mind?
- mlhpdx 2y agoNo, it’s just weird and out of context. Just plain “pick” maybe.
- fragmede 2y agomaybe git alias --global pick cherry-pick
- relaxing 2y agocherry picking has a negative connotation in its most common usage.
- fragmede 2y agosure but is it enough to avoid using it though? I don't like to get screwed in business, but I don't avoid the screwdriver in my toolbox when I need one.
- starsixtynine 2y ago[flagged]
- initialcommit 2y agoHard agree. I love this mindset! If you put a tool in your toolbag you should know how to use it. Git 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.
- rectang 2y agoVersion control is one of our main tools for interacting with other developers. Having a rich understanding of your version control software often helps to find solutions and workarounds for problems which would otherwise result in needless conflict.
- bloomingkales 2y agoCore: - 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.
- rochacon 2y agoI would just add `git rebase -i` to the mix. Very useful to clean up a work branch before submitting it for others. Sometimes you just need a bunch of "wip" commits, e.g. testing CI scripts, deploying a optimization on the side for further testing, etc. and rebase is a must if you care about the commit log.
- starsixtynine 2y agoYou forgot to include an explanation of what rebase does, which is important for knowing when to actually use it, instead of just specific goals you might have.