I’ve noticed a trend where LLMs append Co-authored-by: [AI Name] to the end of commit messages. Even if you try to prompt it away, context drift or new sessions eventually lead to one slipping through into the codebase.
I’m using a git hook to prevent any of that from reaching my commits instead of relying on LLMs.
#!/bin/sh
if grep -qi "co-authored-by" "$1"; then
echo "error: commit message contains 'Co-authored-by'. Commit rejected." >&2
exit 1
fi
why do you want to hide the attribution unless you are forbidden from using LLM and trying to hide it from someone?! we have opposite rule, if LLM attributed any work on a commit the attribution must be added. if I saw this hook I would suspect some shaddy shit going on
I just don't want LLMs to put stuff I didn't ask for in my commit history. It's equivalent to some kind of free advertising that nobody asked for, in your projects.
> and trying to hide it from someone?!
I think that nowadays, by default, you automatically assume that something has been written with the help of AI, so I don't think this is a valid point or concern.
It is free advertising because now everyone sees "Co-Authored by Claude-Code" everywhere in the commit history and I didn't ask for any of that.
I've been using OpenCode for most of my AI coding lately and it never co-authors commits. According to your reasoning, every person using OpenCode is lying?