They should almost always be included, as their goal is to ignore the "output" files (compiled binaries, log files) that will be created by someone working with a clone of your project. They are intended for version control and are included in the repository.
You should not use .gitignore files in the repository to ignore files that are displayed only for you, such as page-specific swap files. You must place these rules in the global .gitignore file .gitignore that they apply to all repositories or in .git/info/excludes .
meagar Jul 08 2018-11-11T00: 00Z
source share