Answer the question
In order to leave comments, you need to log in
Is it possible to add single lines to gitignore?
When working, sometimes you have to use wardumps, console logs, etc. With intermediate commits, you have to delete all unnecessary lines, and then return them if they are still needed, which actually tires, and sometimes you forget to remove some.
Therefore, I wonder if it is possible to exclude individual lines from commits?
Answer the question
In order to leave comments, you need to log in
Create your own log or vardump function that echo data only in development
mylog function(data) {
if(getEnv("APP_ENV") == 'dev') {
console.log(data)
}
}
Well, as an option, some kind of pre-commit hook that will clean up files before committing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question