diff --git a/git_clean.bat b/git_clean.bat new file mode 100644 index 0000000..f02956d --- /dev/null +++ b/git_clean.bat @@ -0,0 +1,22 @@ +@echo off +chcp 65001 >nul +echo 正在检查将要清理的文件和文件夹... +git clean -fd -n + +set /p confirm=是否确认清理这些文件?(y/N): +if /i "%confirm%" neq "y" ( + echo 操作已取消 + pause + exit /b +) + +echo 正在执行清理操作... +git clean -fd + +if %errorlevel% equ 0 ( + echo 清理完成! +) else ( + echo 清理过程中出现错误,错误代码: %errorlevel% +) + +pause \ No newline at end of file