开发者

git-add dir recursively but obeying gitignore

开发者 https://www.devze.com 2023-02-05 05:23 出处:网络
im using git with java so i have deeply nested directories. to add a pattern to git recursively开发者_高级运维, I am using:

im using git with java so i have deeply nested directories. to add a pattern to git recursively开发者_高级运维, I am using:

find . -iname "*.xml" | xargs git add

which detects ignored directories like 'bin' and aborts (because the shell expands my wildcard, not git)

what is a better way?

http://code.google.com/p/msysgit/issues/detail?id=141


git ls-files --exclude-standard -o | grep '\.xml$'


i hadn't found git add -A which does what i need

0

精彩评论

暂无评论...
验证码 换一张
取 消