I do that as well. Right now I keep a pre-commit script that prevents me from committing those by mistake but I would really like for git to have some kind of .gitignore for patterns in a line. Maybe a weekend project to tackle one day.
Out of interest, why not move those lines into a separate configuration file and put the whole thing in gitignore? With environment variables this is usually pretty trivial.
Oh, I don't mean just enabling debug options but more like print debugging stuff.