Ignore tracked file in git Add folder/** to .gitignore Run in the terminal git rm -r --cached folder Commit and Push Include Ignored file Remove file from .gitignore Run in the terminal git rm -r --cached folder Run in the terminal git add file Commit and Push