Does git support wildcards in paths?

后端 未结 4 471
被撕碎了的回忆
被撕碎了的回忆 2021-02-01 14:41

I have looked, searched, and read documentation and can\'t really find anything about this.

Basically, I want to be able to do this:

git reset -- *.exe
<         


        
4条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 15:36

    To reset all exe files recursively from within a git folder, you can do the following:

    git reset -- \*.exe
    

    Or if you would like to add all java files within a specific sub-folder you can do that too, like this:

    git add ./some/sub/folder/path/**/*.java
    

    where ** means all folders recursively from this point in the path

提交回复
热议问题