git

git clean

删除 untracked 的文件,
-x 忽略 .gitignore 中的配置(可使用 standard ignore rules),也就是即使是 .gitignore 忽略的文件,也会被 git clean 操作删除

-x Don’t use the standard ignore rules (see gitignore(5)), but still use the ignore rules given with -e options from the command line. This allows removing all untracked files, including build products. This can be used (possibly in conjunction with git restore or git reset) to create a pristine working directory to test a clean build.

-e 表示额外的ignore,但只能使用具名匹配,像 *.md 这样的不行(也有可能是bug)
-f 无该参数,不会真正删除文件
-d 该参数表示,文件夹也会被删除

-f, —force If the Git configuration variable clean.requireForce is not set to false, git clean will refuse to delete files or directories unless given -f or -i. Git will refuse to modify untracked nested git repositories (directories with a .git subdirectory) unless a second -f is given. -d Normally, when no is specified, git clean will not recurse into untracked directories to avoid removing too much. Specify -d to have it recurse into such directories as well. If any paths are specified, -d is irrelevant; all untracked files matching the specified paths (with exceptions for nested git directories

  1. mentioned under --force) will be removed.
  1. git clean -fxd -e .vscode -e node_modules

其他
-i 开启命令行交互模式,可以细分 git clean 的步骤,或取消 clean,或添加额外的 standard 规则,或一步一步地删除。
-n, —dry-run 不真实执行 git clean,返回当前命令执行会删除的文件,相当于预览

Tools

tldr

命令行提示

Chrome

ignore list

之前叫 black box,现在改为 ignore list了
debugger 服务器跳过匹配到的路径的 script,也就不再记录相关 路径/堆栈信息,
例如被 sentry 包裹的 console 就可以通过该配置来跳过包裹处,重新展示原本的 console path 信息了。

dev tools 点击 设置icon 进入
image.png
选择 ignoreList 并配置需要忽略的内容,并勾选 add content…
image.png