Skip to content

Instantly share code, notes, and snippets.

@emad-elsaid
Last active July 4, 2017 15:30
Show Gist options
  • Save emad-elsaid/3cb66f3051b260918bd31713b41d4dc1 to your computer and use it in GitHub Desktop.
Save emad-elsaid/3cb66f3051b260918bd31713b41d4dc1 to your computer and use it in GitHub Desktop.
It gets .keep files and count number of files in each directory that has .keep file, Unneeded git keep files will have a number greater than 1 in front of them
#!/usr/bin/env bash
for f in `git ls-files | grep "\..*keep"`; do
echo -n $f
git ls-files `dirname $f` | wc -l
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment