Creating a .gitignore file in the root folder of your project will ensure every file that matches a line within the file will be ignored by git.

Global gitignore

You can ignore files globally by adding them to ~/.gitignore_global.

Delete previous files in gitignore

If you add a file to .gitignore after previously committing that file, you may see untracked changes on those files. You have to remove the old files from the git repository to remove that error.



Last modified: 202110141545