import re


def skip_invalid_files(filename):
    """Ignore certain files during upload (such as dot files, .DS_Store, .git, etc)"""
    if filename == '.bidsignore':
        return False
    else:
        return re.match(r'^\.|.*\/\.|.*Icon\r', filename)