People who want to track empty directories in git, have created the convention of putting files called “.gitkeep” in these directories. Because git is not able to track empty directories. For lazy people (like myself) i have developed this tiny gem which creates .gitkeep files automatically!
##changelog 0.2.4
-
added -h option to show possible options
0.2.3
-
added -a option to execute git add for adding directories which have a .gitkeep file in there
0.2.2
-
added rspec tests -
added interactive mode - counting errors
-
refactored code
0.2.1
- added checks for read/write permissions
- added a counter to show how many files were created
0.2.0
- first release
##usage
# current path
$ gitkeep
# with specified path
$ gitkeep /var/www/myproject
# dryrun - doesn't create any files, but you will see in which places gitkeep would create files
$ gitkeep -d
# or
$ gitkeep -d some/path
# interactive mode - ask you everytime when gitkeep wants to create a file
$ gitkeep -i
# after creating .gitkeep files you can add these automatically with -a option to your git index
$ gitkeep -a##installation see https://rubygems.org/gems/gitkeep