Brackets Git点击克隆按钮报错:root is not empty,重装无效
Hey there, I’ve dealt with this exact Brackets Git issue before—let’s break down what’s going on and fix it!
The error message Expected Error: root is not empty, be sure you have deleted hidden files tells us one simple thing: the folder you’re trying to clone your repo into isn’t actually empty. Even if it looks empty at first glance, hidden system files or leftover Git metadata are lingering there, and the plugin is picking up on them. Reinstalling the plugin won’t help here because the problem is with your destination folder, not the plugin itself.
Here’s how to fix it step by step:
Reveal and delete hidden files in the target folder
On Windows: Open File Explorer, go to the "View" tab, and check the "Hidden items" box. On macOS: PressCmd + Shift + .to toggle hidden files visible. Look for things like.gitfolders,.DS_Storefiles, or any other hidden content—delete all of them.Use a brand new empty folder instead
If cleaning up the existing folder feels like a hassle, just create a totally new, empty folder and select that as your clone destination. This guarantees there’s no leftover junk causing the error.Double-check the clone path in Brackets**
Sometimes the plugin might default to a folder you’ve used before (which has hidden files). When you click the Clone button, take an extra second to verify the "Destination Path" field points to a truly empty directory.
If all else fails, you can clone via the command line first, then open the repo in Brackets:
git clone <your-repository-url> /path/to/your-new-empty-folder
Once cloned, open the folder in Brackets, and the Git plugin should recognize it without any issues.
The exact error message you’re seeing:
Expected Error: root is not empty, be sure you have deleted hidden files.

内容的提问来源于stack exchange,提问作者user9738537

