The gitignore
config is used to specify intentionally untracked files. There are several places to define it. A .gitignore
file is the usual, easily accessible per-repository option which is easily shared among all developers as part of the repository itself.
It is mainly every developer's responsibility to not push unwanted files (like temporary or backup files, logs, previews…) and having a Git config in place to support that (especially if an uncommon toolset is used). But it still makes sense to define a default for unwanted files of very widespread tools as it makes everyones lives easier. This especially prevents common mistakes in Pull Requests from people not working with Git or a certain repository on a regular basis.
Please use https://www.toptal.com/developers/gitignore/api/git,vim,linux,macos,windows,jetbrains+all,visualstudiocode,visualstudio as default for a .gitignore
file.
We decided to ignore probably unwanted files of the following components by default:
- Git
- Linux and common tools like Thunar or Nautilus
- MacOS and common tools like Finder
- Microsoft Windows and common tools like File Explorer
- vim
- Microsoft Visual Studio
- Microsoft Visual Studio Code
- JetBrains Toolset (complete suite / all IDEs)
Extend the .gitignore
file as needed for your project, based on the tools you use (eg. Ansible, Chocolatey, certain build tools, …). You can access Toptal's .gitignore.io WebUI pre-configured with our default to easily add additional templates without much effort.
Please add repository specific things not covered by the any available template below # End of https://www.toptal.com/developers/gitignore[...]
to keep everything easily maintainable.