For me, the .gitignore is not being detected due to tab spaces in front of the files listed in the .gitignore file. Please ensure the content of the .gitignore file is formatted correctly.