I'm trying to commit the following directory structure to git:
web
/uploads
/avatars
/video
I put .gitkeep
into /web/uploads/avatars/
and /web/uploads/video/
and added the following lines to .gitignore
in the root of the repo:
/web/uploads/
!/web/uploads/avatars/.gitkeep
!/web/uploads/video/.gitkeep
But git status
does not show any new files. Invoking git add web/uploads/avatars/.gitkeep
outputs the following message:
The following paths are ignored by one of your .gitignore files:
web/uploads/avatars/.gitkeep
Use -f if you really want to add them.
fatal: no files added
How can I commit an empty directory structure into git repository? P.S. git version is git version 1.8.4.msysgit.0