I'm trying to write a bash line that will look at all the subdirectories in my current folder and tell me if any do NOT contain a ".git". Pseudo:
for subdir in currentdir
if .git does not exist
print subdir
Here's the one-liner I'm trying, which isn't working and seems to print all the subdirectories:
find . -maxdepth 1 -type d -execdir $SHELL -c '[ ! -d ".git" ] && echo "not git repo:" {}' $SHELL -c '{}' ';'
I've found some solutions that let me print all subdirectories that HAVE a .git, like this one -- I'm trying to do the opposite.
What am I doing wrong? Is this possible?