Git clean inside ignored folders

柔情痞子 提交于 2019-12-07 04:37:58

问题


I have a folder foo that is included in gitignore:

 - .gitignore  (this contains 'foo')
 - foo
    *
    *** bar

When I run git clean -f or git clean -f -x, this does not delete bar (bar is a normal file).

Is there a way to tell git to clean inside ignored folders?


回答1:


git clean -fdx will delete all untracked files, including directories. The -d is necessary to cause the cleaner to descend into the untracked dir.



来源:https://stackoverflow.com/questions/9314190/git-clean-inside-ignored-folders

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!