Recursively add files by pattern

前端 未结 11 1361
予麋鹿
予麋鹿 2020-11-28 18:18

How do I recursively add files by a pattern (or glob) located in different directories?

For example, I\'d like to add A/B/C/foo.java and D/E/F/bar

11条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 18:34

    With zsh you can run:

    git add "**/*.java"
    

    and all your *.java files will be added recursively.

提交回复
热议问题