remove-nul

Installation
SKILL.md

刪除 nul 檔案

背景說明

在 Windows 環境中,nul 是系統保留的裝置名稱(類似 conauxprn 等),無法透過一般方式(如 delPowerShell Remove-Itemgit rm)刪除。需要透過 Git Bash 的 POSIX 檔案操作來繞過此限制。

執行流程

  1. 確認檔案存在:執行 git status --short -- nul 確認 nul 檔案存在於工作目錄中
  2. 刪除檔案:在 Git Bash 環境下執行 rm -f nul
  3. 驗證結果:再次執行 git status --short -- nul 確認檔案已被移除

指令

# 步驟 1:確認檔案存在
git status --short -- nul
Related skills
Installs
1
First Seen
Mar 6, 2026