git clean -d -fx慎用error: The following untracked working tree files would be overwritten by checkout

报错
error: The following untracked working tree files would be overwritten by checkout

git clean -d -fx
但是千万慎用,用之前备份一下项目代码,特别是项目中不跟踪提交的有用的脚本与配置文件等
这个命令会
1.-x 删除忽略文件已经对git来说不识别的文件
2. -d 删除未被添加到git的路径中的文件
3. -f 强制删除
这个删除之后,回收站不会有, 很难找回来
心痛呀!

提前安装vscode (local History) by xyz 不知道能不能恢复

git文档说明
Cleaning your Working Directory
Finally, you may not want to stash some work or files in your working directory, but simply get rid of them; that’s what the git clean command is for.

Some common reasons for cleaning your working directory might be to remove cruft that has been generated by merges or external tools or to remove build artifacts in order to run a clean build.

You’ll want to be pretty careful with this command, since it’s designed to remove files from your workin

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值