Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add all empty directories to github
#This shell script will find all empty directories and sub-directories in a project folder and creates a .gitkeep file, so that the empty directory
#can be added to the git index.
find * -type d -empty -exec touch {}/.gitkeep \;
@gautamkrishnar
Copy link
Author

By default empty directories are not added while using git add . command...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment