add file in root to gitignore code example Example: how to put access.log in gitignore git rm --cached [file] git update-index --assume-unchanged [file]