Skip to content

Instantly share code, notes, and snippets.

View MarcinGil's full-sized avatar
🏠
Working from home

Marcin Gil MarcinGil

🏠
Working from home
View GitHub Profile
@MarcinGil
MarcinGil / Recursively add .gitignore files to empty dirs
Created June 3, 2009 13:15
Recursively add a .gitignore file to all directories
# Recursively add a .gitignore file to all directories
# in the working directory which are empty and don't
# start with a dot. Helpful for tracking empty dirs
# in a git repository.
for i in $(find . -type d -regex ``./[^.].*'' -empty); do touch $i"/.gitignore"; done;