Git ignore is a special file in git version control, its specified by the file .gitignore .
As the name indicates, it’s used to make that git not track specific files. For example when you have application logs, configuration files or compiled files.
If you want to ignore a, specific directory , let’s call it config:
To ignore all files with the .log extension
You also can ignore a, specific file, like passwords.pass
Another less known option is the exceptions, you can use ! to indicate that you want to track an ignored part of a path. In this example you will ignore all except /foo/bar
/* !/foo /foo/* !/foo/bar
Usually when you make a project you use a template depending on the language that you are using.
You can use this tool to generate a language specific gitignore:
Github also haves a repository with gitignore templates for different languages