Ignoring files with .gitignore

the .gitignore file allows us to list files that we don’t want to track at all. These files won’t appear as “Untracked files” when viewing the git status result.

You can ignore an entire folder by specifying the folder name. Or you can ignore certain type of files with the wildcard character. For example: build/*.exe.

We usually want to ignore the build and output because these can be compiled. In version control, we control the source code.

NOTE: You can still force adding files that is ignored by using the git add -f option.