Content-Type: text/shitpost


Subject: Good work, Mr. Dominus!
Path: you​!your-host​!ultron​!ihnp4​!grey-area​!fpuzhpx​!plovergw​!shitpost​!mjd
Date: 2018-09-19T16:48:31
Newsgroup: alt.mjd.good-design
Message-ID: <d5d2fc3e99b70234@shitpost.plover.com>
Content-Type: text/shitpost

Today I went to push some Git branch to a private Git repository, and I received the following reply:

# You are trying to push 0 commits that have 'wip' in their messages!
The naughty commits are:
#   6a9a5e0c970
#   24eddb9721b
#   ba286d92d29
#   da6a115165a
#   d06caa5d8c4
#   ee4a2baf8c6
#   9be7089ec1a
#   4868c296c65

Oh, crap, it must be some experimental hook I put into the remote repo. Unfinished from the looks of it. (Because of “0 commits”. A bug that obvious and unavoidable must mean that the work was half-baked.)

So I thought grumpily that I would to have to get into the remote machine and disable the hook…

And then I saw that the message ended with:

    #   (Use git-push --no-verify to evade this check.)

Oh, thanks! Useful!

And because of that, I realized that it was actually a local hook, .git/hooks/pre-push in fact. So I just opened the editor and fixed the bug. And then I used --no-verify, which was the right thing in that circumstance.

I forget stuff a lot, and putting in this sort of hint really helps me when I fall foul of my own incomplete work, months after I have forgotten it. It's like a gift from my past self, and getting them also motivates me to try to send more such gifts to my future selves.