Adding files to gitignore

  • Update the .gitignore file and save it

  • Then in terminal, type git rm -r --cached .

    • This will remove all the cached files
  • Then type git add . and commit the changes with git commit -m "Update git cache"

That should be it!

If you have already started on a project and add these steps later:

  • Your additions to the gitignore file will not be effective until you remove the cache, as per the steps above