Does the .gitignore file belong in the .git folder structure somewhere or in the main source files?
Put .gitignore in the working directory. It doesn't work if you put it in the .git (repository) directory.
$ ls -1d .git* .git .gitignore
2.1m questions
2.1m answers
60 comments
57.0k users