remove a file git with gitignore code example Example: git remove file from gitignore git rm --cached