Recursively add files by pattern

前端 未结 11 1374
予麋鹿
予麋鹿 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:49

    I wanted to only add files that had a certain string based on git status:

    git status | grep string | xargs git add

    and then was able to git commit -m 'commit msg to commit all changed files with "string" in the title of the file

提交回复
热议问题