By executing some pull, push, rebase, merge ... some empty directories remained in my project.
Later I found out that Git does not track directories , and there is a command to delete such directories.
Git clean -fd
This command will clear all files that are not in your git repository, including folders.
but the above team also deletes all irreproducible files and directories, this is a big loss in current development projects.
Is there a way to delete only empty folders without touching untracked files.
source
share