Search code examples
gitmsysgit

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


Solution

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