Think before you speak, read before you think.

git查看清理gitignore的文件

by

in

查看可以清理的文件

git clean -ndX

确定好之后要清理运行

git clean -fdX

查看 clean 的 help

$ git help clean

git-clean - Remove untracked files from the working tree
-n, --dry-run - Don't actually remove anything, just show what would be done. 测试查看哪些文件可以被删除。
-d - Remove untracked directories in addition to untracked files. 同时清理目录
-X - Remove only files ignored by git. 清理被 ignored 的文件

参考:

http://stackoverflow.com/questions/466764/show-ignored-files-in-git


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *