Scenario: I have a Unity (the game engine) project that builds to Windows, Android and iOS. A few folders are only relevant for Windows and should be out of the project for the Android and iOS versions. Unity does not offer a good way of doing this, so I have three clones of the project (on different machines), with those folders removed.
The problem with this approach: Sometimes, I'll make changes in one of the clones but there are about 16K "changed" (actually deleted) files, making it pretty hard to find the actually changed files in GitHub for Desktop (I also use TortoiseGit but that has the same issue).
Using .gitignore? Nope: At first I tried using .gitignore - but that's designed for actually ignoring the files, i.e. not version controlling them. Doesn't help for my use case because I want those files version controlled, and certainly not deleted in the repository.
Using branches: Probably would work if I committed the delete in the branch but it would mean I'd have to merge all changes in the main branch to the branch where the folders are deleted all the time, so that seems rather cumbersome for what I need (unless I'm missing something).
Using .git\info\exclude: Maybe I just did something wrong but it didn't hide the deleted files, either. I'm assuming this is also for actually excluding the files from version control (so the deleted files still show up). But what I want is keeping the files in version control and just hiding them from view.
I have seen Ignore deleted files in git?, which recommends splitting the repo. This seems fairly close to what I need but still feels like using a sledge-hammer to crack a nut.
So ... How can I hide (not ignore) deleted files in one clone?