Just posting this quickly as I need to do more cleanup, but I was alerted to an issue this morning that stems from empty folders being removed from production docker container during a recent push.
If I recall correctly, a new git library is now in use, so just alerting here that empty folders MAY be removed in some circumstances.
I'll follow up later after I have time to properly diagnose.
ChatGPT:
In Git, discarding changes (like with git restore or git checkout --) only affects tracked files, and Git by default does not track empty folders. Here’s how it works:
• Empty folders are not tracked by Git — Git tracks files, not directories. If a folder has no tracked files in it, Git doesn’t know or care about it.
• Therefore, discarding changes won’t remove empty folders, because those folders aren’t under Git’s control to begin with.
• If a folder had tracked files that you deleted, and you then discard that deletion, the files will come back — and so will the folder, since it will no longer be empty.