Followup ... there have been some very interesting and enlightening explanations about how "git rm" globbing works, and it's not intuitive. The major observation is that simple globbing with "git rm" happily crosses directory boundaries, so the command:
$ git rm log/\*.log
will remove all .log files under log/ recursively. Simple test to prove this using the Pro Git repo itself, with a dry run (as above):
$ git rm -n '*.asc'
rm 'LICENSE.asc'
rm 'README.asc'
rm 'TRANSLATION_NOTES.asc'
rm 'book/01-introduction/1-introduction.asc'
rm 'book/01-introduction/sections/about-version-control.asc'
rm 'book/01-introduction/sections/basics.asc'
rm 'book/01-introduction/sections/command-line.asc'
rm 'book/01-introduction/sections/first-time-setup.asc'
rm 'book/01-introduction/sections/help.asc'
rm 'book/01-introduction/sections/history.asc'
rm 'book/01-introduction/sections/installing.asc'
rm 'book/02-git-basics/1-git-basics.asc'
...
and so on, and so on. The man page for "git rm" does in fact make this clear, the book should probably note this as well:
EXAMPLES
git rm Documentation/\*.txt
Removes all *.txt files from the index that are under the Documentation directory and
any of its subdirectories.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.