Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@gautamkrishnar
Last active June 28, 2019 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gautamkrishnar/7996a755068eef23da9fd4dd2eff7238 to your computer and use it in GitHub Desktop.
Save gautamkrishnar/7996a755068eef23da9fd4dd2eff7238 to your computer and use it in GitHub Desktop.
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