How can ignore a files that have already been committed to the repo?

If a file already committed and pushed into your github repo. And you forgot to add in .gitignore and...
If a file already committed and pushed into your github repo. And you forgot to add in .gitignore and...