I am working on some code in a git repo, and there are several temporary changes I have made which turn off specific events. These changes are only intended to make it easier for me to develop and test the code (including debug output), and should never be committed to the repo. I have a big comment saying this, but I feel like I could do more.
Is there a character string I can include in my code that will prevent a file from being git committed?
I know that git will warn you not to commit code if there is a merge conflict, which is represented by character string, so this functionality does exist. I am wondering If there is a character string specifically intended to simply stop commits.
I want to add some characters to my code, near specific lines that I must remove before I commit my code. Basically, I'm searching for a safety measure which will not allow me to commit the file, and will draw my attention to the location of the code that needs to be remove. .gitignore is not useful in the case. I need to make the change (i.e. flag) within the text of file that I am working on. The file is tracked. I wish for it to remain tracked. Also, I need to specify a line number.
The ability to include the directive within the effected file is needed.
Also
This code should never leave the dev's environment, nor be committed to the repo, nor be included in any feature, nor be included in a release, nor find its way to the test, qa or production server.
Example:
// $this->send_manditory_daily_email();
// Note to future me:
// ABSOLUTLY DO NOT COMMIT THIS TO THE REPO!!!
// IF YOU DO IT WILL CAUSE MAJOR COMPLIANCE ISSUES
// WOW! I WISH THERE WAS A WAY TO PREVENT THIS
// FILE FROM BEING COMMITTED AS IT IS NOW