“git add *.js” did not add the files in sub-directories

后端 未结 3 1853
被撕碎了的回忆
被撕碎了的回忆 2021-02-20 02:00

Was trying to commit some changes. I used git add to add any new javascript files that I may have created using the wildcard *.js. Then I committed cha

3条回答
  •  星月不相逢
    2021-02-20 02:59

    You need to use

    git add '*.js'
    

    You have to use quotes so git receives the wildcard before your shell does. If you do not have quotes the shell will only do the wildcard search within your current directory.

提交回复
热议问题