Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can combine "git checkout" with "find". This will work assuming the directories "dir1" and "dir2" cause the error...

find . -type f -path "*/path/here" | grep -v -E "(dir1|dir2)" | xargs -I '{}' git checkout -- '{}'