How to apply .gitignore to an existing Git repository
Git is an awesome tool to track the version history of your files and to collaborate on software development. Almost every project you create has a .gitignore file, to specify which files in the directory should not be tracked by Git. But sometimes you want to change or update your .gitignore in order to remove a file from your repo. Unfortunately, those changes are not reflected immediately by Git: you have to apply the .gitignore file again.