I don't get this behaviour
git status
...
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   ansible.log
while
me@rhel8:~/repos/ansible_get_postgres_version> cat .gitignore 
ansible.log
*.log
*.out
so, apparently the .gitignore is not effective when in comes to the ansible.log file.
However, .gitignore is not completely ineffective
echo "hello gitty" > test_this.out creates such a file but that is not shown as new to git with a git status (so, it actually is ignored).
One condition I could imagine as being the culprid is the fact that maybe the .gitignore did not exist before the ansible.log file got created. It that is the case ... what would I have to do in order to get it to being ignored by git as intendet?
 
     
    