code-8
code-8

Reputation: 58790

Gitignore doesn't ignore a specific folder

I have add this files into my gitignore file

public/file/*

and when I did git status, I still see

new file:   public/file/external/description.txt
new file:   public/file/external/header.txt

How do I make everything inside my public/file/ ignore by git ? How do stop that ?

Do I need to clear any caches ?

Upvotes: 2

Views: 1647

Answers (1)

CollinD
CollinD

Reputation: 7573

You should be able to accomplish this either with

public/file/**

From the docs, ** means any number of subdirectories

I think that ignoring the directory specifically rather than objects within it will work also

public/file/

Upvotes: 5

Related Questions