How to remove local (untracked) files from the current Git working tree? Posted in : 電腦相關應用 2017-09-26 答案是 git clean -fdx To remove untracked files / directories do: git clean -fdx -f – force -d – directories too -x – remove ignored files too ( don’t use this if you don’t want to remove ignored files) git