Is there any possibility to enforce all new source code files checked in to a particular repository through Git to have a particular comment, else the push should fail with or without a message. The source code will be of cpp or cxx or cc extensions.
How do we verify commit messages for a push? is about enforcing something in the commit message but I want to enforce something in the source files that are being checked in.
Say for example, If I am writing a GPL library and anyone who commits into the repository should have the GPL license and author name, something like that.