of all the bad things i've done as a software developer, perhaps my favorite is using a non-bare remote git repo with a hook to make it automatically reset the working tree on each new push. who needs a proper deployment pipeline, right
the context is a discord bot written in python with some hot-reload functionality so i don't have to ssh in to stop and restart the bot whenever i make changes. this way when i push an update all i have to do is send the bot a reload command
... but i imagine you could put more things in that hook to make it e.g. compile and/or (re)start a service automatically
...... but really, at that point you should be using a proper pipeline, maybe with CI and testing
caveat programmor
if you're curious, this is what i put in the post-update hook:
cd ..
env -i git reset --hard