News for hackers. Stuff that matters.
Re:A Saner Windows Command Line by yoodenvranx on Wednesday March 30, 2016 @09:10AM (#11388949)
> 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.

Re:A Saner Windows Command Line by jrumbut on Wednesday March 30, 2016 @11:48AM (#11390148)
If 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.

Re:A Saner Windows Command Line by yoodenvranx on Thursday March 31, 2016 @07:48AM (#11396428)
Thx for the tip about man pages, somehow I never thought about reading them.
Re:A Saner Windows Command Line by Klathmon on Wednesday March 30, 2016 @09:13AM (#11388966)
Holy 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.

Re:A Saner Windows Command Line by scrollaway on Wednesday March 30, 2016 @09:24AM (#11389034)
It'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.
Re:A Saner Windows Command Line by emodendroket on Wednesday March 30, 2016 @09:29AM (#11389070)
You 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.
Re:A Saner Windows Command Line by lottin on Wednesday March 30, 2016 @09:48AM (#11389204)
For rare commands that are repeated every so often history search comes in handy.