3 ms·
> Some of it stems from the fact that i just don't use it enough, but most of it from the fact that this shit just isn't intuitive. I have exactly the same pro
by yoodenvranx 11y ago
> Some of it stems from the fact that i just don't use it enough, but most of it from the fact that this shit just isn't intuitive.
I have exactly the same problem.
I use Linux since about 8 years but somehow I just don't use the commandline very often so I forget stuff all the time. Because of this I have half a dozen post-its glued to my monitor for all the grep/git/whatever tricks I just can't keep in my head. And for other stuff I use about once a year I have a long linux_tricks.txt on my desktop where I write down all the tricky and obscure command line stuff.
- Klathmon 11y agoHoly shit git! I need to reset my git repo to match origin, is it git reset hard --HEAD or git reset HEAD --hard? I'm like 90% sure they switch it with every update.
- scrollaway 11y agoIt's just git reset --hard. HEAD is implied. Edit: To be more specific: git # the executable reset # the operation --hard # the type of reset being done (hard reset) HEAD # where to reset *to*. Defaults to HEAD if not specified.
- emodendroket 11y agoYou can just leave out HEAD since it is implied, but understanding a little bit about git, like what the head is supposed to be, would probably help you.
- lottin 11y agoFor rare commands that are repeated every so often history search comes in handy.
- jrumbut 11y agoIf you're interested in getting past this stage of learning the Linux/Bash environment, I'd recommend reading man pages. I worked with someone who introduced me to this approach, and at first I was like "I'll just Google it again and get on with my life," but once I forced my way through a couple of them it's really opened my eyes and changed the way I use the tools available. ls has enough options to spell most people's names (capitalization included), and a lot of grep pipelines can be replaced with options passed to grep. It turns out that we're almost always doing things the hard way or reinventing the wheel.
- yoodenvranx 11y agoThx for the tip about man pages, somehow I never thought about reading them.