Re: Handling empty directories in Git
- From
Andrew Keller <andrew@kellerfarm.com>
- Date
- Apr 8, 2014, 17:20 UTC
- Message-ID
- <AE92C2A5-4EFE-454C-8D61-804AEE72D955@kellerfarm.com>
- In-Reply-To
- <3FBDE5D3-1DC6-420C-866B-036D0CB17BA2@kellerfarm.com>
On Apr 8, 2014, at 1:02 PM, Andrew Keller <andrew@kellerfarm.com> wrote:
Show 13 quoted lines
> On Apr 8, 2014, at 10:47 AM, Olivier LE ROY <olivier_le_roy@yahoo.com> wrote: > >> Hello, >> >> I have a project under SVN with contains empty directories. >> >> I would like to move this project on a Git server, still handling empty directories. >> >> The solution: put a .gitignore file in each empty directory to have them recognized by the Git database cannot work, because some scripts in my projects test the actual emptiness of the directories. >> >> Is there any expert able to tell me: this cannot be done in Git, or this can be done by the following trick, or why there is no valuable reason to maintain empty directories under version control? > > Git is designed to track files. The existence of folders is secondary to the notion that files have a relative path inside the repository, which is perceived by the user as folders.
To clarify: That's Git's "personality" from the point of view of the front end, and is not the same as how data is actually stored.
Thanks, Andrew Keller