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

  • Can't git clone from github. remote: fatal: failed to apply delta
  • How to mirror a github repository, while maintaining my small changes?
  • Commits from different branch on GitHub Pull Request
  • Using git to put a project into a repository
  • Installing Git and Mercurial on the same machine
  • Git Integration to The Bug Genie?
  • 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 ?

  • How does git track changes to files
  • Missing objects in git
  • How do patches work in Git?
  • How do we check equality of two Objects i.e. file contents in repository by using CommitIds?
  • git push fails with “fatal: remote error: access denied or repository not exported”
  • Branching and merging with Git
  • One Solution collect form web for “Gitignore doesn't ignore a specific folder”

    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/
    
    Git Baby is a git and github fan, let's start git clone.