On Sat, 8 Sep 2012 08:38:21 -0700 (PDT) Mindcast Mindcast <[email protected]> wrote:
> is there any way to include empty folders when i git commit without > adding a file (like .gitignore or .gitkeep) ? > > As long as i know there is no official way to do this. Impossible [1]. > But, is this something it can be implemented maybe in a future > version ? Unlikely. The original design decision (and hence the official stance of the core Git developers) is that "Git tracks content, not files". Hence it does not even really track files (I mean, Git does not put special sense into the names of the files it tracks, which is in stark contrast to, say, Subversion) but rather the contents of those files -- for instance, the fact the file has been renamed in a commit is not recorded in that commit in any way (`git mv` is just a convenience command, it does nothing really special). Looks like tracking empty directories would mean actually paying attention to their names -- something Git does not do by design. Note that messing with placeholder files is not the only way to maintain empty directories: some people think this is better implemented as a part of the project's build framework. 1. https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
