Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.6 KB

README.md

File metadata and controls

61 lines (45 loc) · 1.6 KB

Build Status #gitkeep (ruby >= 1.9.3 required)

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.3.2

  • added autoclean method to remove not needed .gitkeep files - THX to Scott(!)
  • refactored rspec test

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 test
  • 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

# removes unneeded .gitkeep files
$ gitkeep -ac

# removes unneeded .gitkeep files, also from your git index
$ gitkeep -acr

##installation see https://rubygems.org/gems/gitkeep