Git does not work with directories. Git works with files.
Your entry means that if the project had a .gradle file in the root of the project, it would be ignored.
In order to disable tracking files in the .gradle directory, .gradle need to use the /.gradle/** construct