Git ignores empty folders
Migrated code from SVN to Git and found my folder tree was partially missing because git ignores folders. It is only concerned with files, so to force the folder tree to exist add an empty file to each folder that should exist and commit the changes. Edited based on feedback to add: Use a "dot-file" such as ".gitempty" to cause it to be omitted in standard file listings.
Written by Colin Keith
Related protips
2 Responses
It's better to rename the file to .gitkeep because it is a good practice to hide all .* files on the server. ide also hide such files by default. I mean this is "service" file.
over 1 year ago
·
That makes perfect sense. Thanks!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#