开发者

git-add dir recursively but obeying gitignore

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜