There's a project I'm working on that accesses an FTP server to upload an image. When developing locally, it can't access the FTP server as it is only accessible within a certain virtual private cloud.
In order to test it locally, I need to rewrite parts of the code to skip the FTP upload. The obvious answer would be to add some kind of check for an environment variable or something, and have it upload or not upload depending on the environment. However, when I've asked for permission to make this change, it has been consistently put off due to being low priority.
The problem is, I know that eventually I'm going to make these temporary changes and then accidentally commit them. I've done it once before but luckily realized my mistake in time to revert the changes.
Is there any way that I can make the necessary temporary changes, and then immediately git prevent-commit filename.php
or something like that on the related files, so that git yells at me if I try to commit those changes in the future, or something along those lines?