Commands to Clear a Git Repository's Cache

If you have performed a task, such as adding a new line item to your .gitignore file, you may need to clear out your git repo's cache in order for the changes to take place. Here are the commands for doing that:

 

Source: