I would like to make sure git ignores any log files created based on rotation. For instance,
debug.log
debug.log.1
debug.log.2
debug.log.10
should be ignored. I am currently using *.logand *.log.[0-9]to ignore the first 3 on the list. To capture the third, I know what I can use *.log.[0-9][0-9]. However, I would prefer to find a one-liner solution that could capture all of this.
Is it possible to specify a gitignore file to match one or more digits?
source
share