This is an asset that cleans empty directories and corresponding meta files in your project. I created this asset to solve empty directories on Unity and Git problem. You can also install this asset from the Asset Store.
Add this line to your Packages/manifest.json
"com.altprog.clean-empty-directories": "https://github.com/siberder/UnityCleanEmptyDirectories.git#upm"