Skip to content

Instantly share code, notes, and snippets.

@greghor
Created January 23, 2020 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greghor/2a714826c4da8b7cc3828e94cab8eaf2 to your computer and use it in GitHub Desktop.
Save greghor/2a714826c4da8b7cc3828e94cab8eaf2 to your computer and use it in GitHub Desktop.
copy .gitignore in all folders that contains a .gitkeep
#adapted from https://unix.stackexchange.com/a/180616
find . -name ".gitkeep" -exec sh -c '
for file do
dir=${file%/*}
cp data/raw/.gitignore "$dir"
done' sh {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment