gitignore

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.

References

  1. https://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository
  2. https://git-scm.com/docs/gitignore

Last modified: 202110141545