On 2011-01-16 20:58 +0100, Boyd Stephen Smith Jr. wrote:

> In <[email protected]>, Andrei Popescu wrote:
>>$ git init
>>Initialized empty Git repository in /home/amp/Download/gitest/.git/
>>$ touch dir/file3
>>$ echo '*' > .gitignore
>>$ git status -s
>>$ echo '!file1' >> .gitignore
>>$ echo '!dir/' >> .gitignore
>>$ git status -s
>>?? file1
>>$
>>
>>Why is 'dir' still ignored?
>
> Looks like a bug to me.  It is at least an undocumented feature.

The FAQ mentions¹ that you cannot add empty directories in git, and the
'*' in .gitignore means that no _files_ below dir/ will be added.

Sven


¹ https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F


-- 
To UNSUBSCRIBE, email to [email protected] 
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to