Skip to content

Instantly share code, notes, and snippets.

@D1360-64RC14
Created July 25, 2025 19:24
Show Gist options
  • Save D1360-64RC14/073b3e680d4364358bb2ce44be4cabc7 to your computer and use it in GitHub Desktop.
Save D1360-64RC14/073b3e680d4364358bb2ce44be4cabc7 to your computer and use it in GitHub Desktop.
Delete all .gitkeeps within a folder already with files.
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