我希望找到一种使用正则表达式的方法来使用git clean
。
没有正则表达式:
git clean -dfx --exclude=".idea/"
使用正则表达式(尝试过但不起作用):
git clean -dfx --exclude='(.*\/)*(\.idea\/.*)(.*)'
git clean -dfx --exclude="(.*\/)*(\.idea\/.*)(.*)"
git clean -dfx --exclude=r'(.*\/)*(\.idea\/.*)(.*)'
git clean -dfx --exclude=r"(.*\/)*(\.idea\/.*)(.*)"
你如何使用正则表达式来使用
git clean
?
grep
的包装脚本。 - shadowtalker