Created
July 25, 2025 19:24
-
-
Save D1360-64RC14/073b3e680d4364358bb2ce44be4cabc7 to your computer and use it in GitHub Desktop.
Delete all .gitkeeps within a folder already with files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ign in $(find . -name '.gitkeep' ! -path './vendor/*'); do | |
if [[ $(ls $(dirname $ign) | wc -l | tr -d ' ') > 0 ]]; then | |
rm $ign | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment