How to remove local (untracked) files from the current Git working tree

前端 未结 30 2238
死守一世寂寞
死守一世寂寞 2020-11-22 00:07

How do you delete untracked local files from your current working tree?

30条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 01:01

    git clean -fd removes directory

    git clean -fX removes ignored files

    git clean -fx removes ignored and un-ignored files

    can be used all above options in combination as

    git clean -fdXx

    check git manual for more help

提交回复
热议问题