git ignore adds current path code example
Example 1: git exclude folder
directory_to_exclude/
Example 2: how to put access.log in gitignore
git rm --cached [file]
git update-index --assume-unchanged [file]
directory_to_exclude/
git rm --cached [file]
git update-index --assume-unchanged [file]