def is_ignored_file(f):
    """Check if this file has to be ignored.

    Ignored files includes:
    - .gitignore
    - OS generated files
    - text editor backup files
    - XCF image files (Gimp)
    """
    return f == '.gitignore' or f == '.DS_Store' or f == '.DS_Store?' or \
        f == '.Spotlight-V100' or f == '.Trashes' or f == 'ehthumbs.db' or f == 'Thumbs.db' or \
        f.startswith("._") or f.endswith(".swp") or f.endswith(".bak") or f.endswith("~") or \
        f.endswith(".xcf")