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