Fix absolute paths with patterns in .gitignore.