otherwise deployment on Linux will fail, as it interferes with this .git directory. In any case heving it is annoying since the reference to is keeps changing. Since we don't care about the history, just the files of the theme, it makes sense to remove the .git dir completely.
Having done this fixed my deployment issues on Netlify.