I have reading plenty of answers, but none of them works for me. Specifically:
I have a project where I want to ignore all .csv files. So, when I run git init the git hidden folder is created, I go in there, create the text file .gitignore and I write inside :
*.csv
However, when I run git status it doesn’t work. I thought it was because when you create a file in windows, you need to choose an extension. So in my case the name of the file actually was .gitignore.txt, but thanks to this answer I was able to name it correctly. However, when I run git status still appear all .csv files. And no, I haven’t added those files (because as I said at the begining, I just run git init and given my research, git init doesn’t run a git add behind). Here is a photo of the .git folder:
And the git status output (some lines of it):
>Solution :
.gitignore does not go into .git/, it goes in the top level directory with your normal files.
If you don’t want to check in your ignore file (generally you should), you can instead use .git/info/exclude

