Skip to content

清理

新增文件。

echo 'Hello World' > hello.txt

预览清理文件。

git clean -n
Would remove hello.txt

强制清理文件,恢复原样。

git clean -f
Removing hello.txt

以上两个命令,无法处理文件夹。

新增文件夹,新增文件。

mkdir hellor

echo 'Hello World' > hello/world.txt

预览清理。

git clean -nfd
Would remove hello/

强制清理,恢复原样。

git clean -fd
Removing hello/

联系 math@baima.site