0
我知道如何创建简单的别名,但是有一个非常有用的命令来从磁盘中取消删除的文件,我无法使其工作。嵌套命令中的Git别名
git rm $(git ls-files --deleted)
(从这里Removing multiple files from a Git repo that have already been deleted from disk)
我曾尝试用:
git config --global alias.cleandeleted 'rm $(git ls-files --deleted)'
但是,当我写:
git cleandeleted
我收到以下错误:
error: unknown option `deleted)'
usage: git rm [options] [--] <file>...
-n, --dry-run dry run
-q, --quiet do not list removed files
--cached only remove from the index
-f, --force override the up-to-date check
-r allow recursive removal
--ignore-unmatch exit with a zero status even if nothing matched
工程就像一个魅力!非常感谢 – bgusach
不客气! :-) – mkrnr