Created
January 8, 2014 05:42
-
-
Save simoncoulton/8312372 to your computer and use it in GitHub Desktop.
Create empty gitkeep files in directories that are empty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d -empty -exec touch {}/.gitkeep \; |
what about in Windows ? how to do it ?
i have used/ installed cygwin :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
find . -type d -empty -not -path '*/\.*' -exec touch {}/.gitkeep \;
will ignore empty directories inside the .git folder 😄