Hacker News new | ask | show | jobs
by Detry322 2806 days ago
Just hopping on this thread post for a shameless plug:

https://github.com/Detry322/git-psuh

Why make errors do the thing you want, when you can make them do things you don't want? ¯\_(ツ)_/¯

Carpenters have "measure twice, cut once", since there's risk involved with a mistake. Let's make mistakes risky.

4 comments

"I've cut the board 3 times and it is still too short!"
I built a bathroom with a heated floor last year. For that floor I needed 42 m of heating cable. This cable is poured into the flooring screed and as such can not be spliced, it has to be in one piece.

Ir ordered 42 m and got a parcel with 18 m in the mail, apparently the person who processed the order mistook the order sequence number - 18 - for the ordered amount. I notified the supplier about this mistake, added some photo's of the cable - which is helpfully marked in meter-increments - and told them to send a new cable as I ordered 42 m.

The supplier sent 24 m of cable.

This genuinely made me chuckle.

That said, if mistyping ‘git push’ is a common occurrence, why not just define an alias?

Even better, git supports correction of misspelled commands, but you have to turn it on:

    git config --global help.autocorrect 1
Although I also alias gti—>git...
gti—>git...

so it's not just me then? I feel better now, thanks :)

Thanks! I hate it :)
Spare the rod, spoil the child!