Search code examples
htmlgitgit-add

Git ignoring add with wildcard for some files


I have a project am working on:

there I have many files, I can do something like:

git add *.cvs

and git gently add all csv files for commiting, so far so good...

but if I try to do the same with *.html files, git just ignore my commands, then I have to add those one by one by the name

Why?


Solution

  • Try quoting the pathspec like this:

    git add "*.html"

    The reason behind it is that shell expands the wildcard before git.