You wrote a script that creates many intermediate log-files of the form log_01, log_02, log_03, etc. You want to keep them but you do not want to track them through git.
.gitignore entry that excludes files of the form log_01, log_02, etc.log_01, etc.log_01 is very important after all, add it to the tracked files without changing the .gitignore again..gitignore.log_* or log* as a new entry in your .gitignorelog_01 using git add -f log_01